Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 877a20e

Browse files
jcommelinsgouezelfpvandoornkim-em
committed
feat(ring_theory/finiteness): some finiteness notions in commutative algebra (#4634)
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net>
1 parent 61c095f commit 877a20e

3 files changed

Lines changed: 271 additions & 9 deletions

File tree

src/data/mv_polynomial/basic.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ finsupp.induction p
253253
(by have : M (C 0) := h_C 0; rwa [C_0] at this)
254254
(assume s a p hsp ha hp, h_add _ _ (this s a) hp)
255255

256+
attribute [elab_as_eliminator]
256257
theorem induction_on' {P : mv_polynomial σ R → Prop} (p : mv_polynomial σ R)
257258
(h1 : ∀ (u : σ →₀ ℕ) (a : R), P (monomial u a))
258259
(h2 : ∀ (p q : mv_polynomial σ R), P p → P q → P (p + q)) : P p :=

src/ring_theory/adjoin.lean

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,7 @@ le_antisymm
129129
exact is_submonoid.mul_mem ih (subset_adjoin rfl) }))
130130

131131
lemma adjoin_singleton_one : adjoin R ({1} : set A) = ⊥ :=
132-
begin
133-
rw [eq_bot_iff, adjoin_singleton_eq_range],
134-
intro a,
135-
simp only [alg_hom.coe_range, set.mem_range, coe_bot, exists_imp_distrib],
136-
rintro φ rfl,
137-
refine ⟨polynomial.aeval 1 φ, _⟩,
138-
simp only [polynomial.aeval_def, polynomial.eval₂_eq_sum, finsupp.sum, ring_hom.map_sum,
139-
one_pow, mul_one, id.map_eq_self]
140-
end
132+
eq_bot_iff.2 $ adjoin_le $ set.singleton_subset_iff.2 $ subalgebra.one_mem ⊥
141133

142134
theorem adjoin_union_coe_submodule : (adjoin R (s ∪ t) : submodule R A) =
143135
(adjoin R s) * (adjoin R t) :=

src/ring_theory/finiteness.lean

Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
/-
2+
Copyright (c) 2020 Johan Commelin. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Johan Commelin
5+
-/
6+
7+
import ring_theory.noetherian
8+
import ring_theory.ideal.operations
9+
import ring_theory.algebra_tower
10+
11+
/-!
12+
# Finiteness conditions in commutative algebra
13+
14+
In this file we define several notions of finiteness that are common in commutative algebra.
15+
16+
## Main declarations
17+
18+
- `module.finite`, `algebra.finite`, `ring_hom.finite`, `alg_hom.finite`
19+
all of these express that some object is finitely generated *as module* over some base ring.
20+
- `algebra.finite_type`, `ring_hom.finite_type`, `alg_hom.finite_type`
21+
all of these express that some object is finitely generated *as algebra* over some base ring.
22+
23+
-/
24+
25+
open function (surjective)
26+
open_locale big_operators
27+
28+
section module_and_algebra
29+
30+
variables (R A B M N : Type*) [comm_ring R]
31+
variables [comm_ring A] [algebra R A] [comm_ring B] [algebra R B]
32+
variables [add_comm_group M] [module R M]
33+
variables [add_comm_group N] [module R N]
34+
35+
/-- A module over a commutative ring is `finite` if it is finitely generated as a module. -/
36+
@[class]
37+
def module.finite : Prop := (⊤ : submodule R M).fg
38+
39+
/-- An algebra over a commutative ring is of `finite_type` if it is finitely generated
40+
over the base ring as algebra. -/
41+
@[class]
42+
def algebra.finite_type : Prop := (⊤ : subalgebra R A).fg
43+
44+
namespace module
45+
46+
variables {R M N}
47+
lemma finite_def : finite R M ↔ (⊤ : submodule R M).fg := iff.rfl
48+
variables (R M N)
49+
50+
@[priority 100] -- see Note [lower instance priority]
51+
instance is_noetherian.finite [is_noetherian R M] : finite R M :=
52+
is_noetherian.noetherian ⊤
53+
54+
namespace finite
55+
56+
variables {R M N}
57+
58+
lemma of_surjective [hM : finite R M] (f : M →ₗ[R] N) (hf : surjective f) :
59+
finite R N :=
60+
by { rw [finite, ← linear_map.range_eq_top.2 hf, ← submodule.map_top], exact submodule.fg_map hM }
61+
62+
lemma of_injective [is_noetherian R N] (f : M →ₗ[R] N)
63+
(hf : function.injective f) : finite R M :=
64+
fg_of_injective f $ linear_map.ker_eq_bot.2 hf
65+
66+
variables (R)
67+
68+
instance self : finite R R :=
69+
⟨{1}, by simpa only [finset.coe_singleton] using ideal.span_singleton_one⟩
70+
71+
variables {R}
72+
73+
instance prod [hM : finite R M] [hN : finite R N] : finite R (M × N) :=
74+
begin
75+
rw [finite, ← submodule.prod_top],
76+
exact submodule.fg_prod hM hN
77+
end
78+
79+
lemma equiv [hM : finite R M] (e : M ≃ₗ[R] N) : finite R N :=
80+
of_surjective (e : M →ₗ[R] N) e.surjective
81+
82+
section algebra
83+
84+
lemma trans [algebra A B] [is_scalar_tower R A B] [hRA : finite R A] [hAB : finite A B] :
85+
finite R B :=
86+
let ⟨s, hs⟩ := hRA, ⟨t, ht⟩ := hAB in submodule.fg_def.2
87+
⟨set.image2 (•) (↑s : set A) (↑t : set B),
88+
set.finite.image2 _ s.finite_to_set t.finite_to_set,
89+
by rw [set.image2_smul, submodule.span_smul hs (↑t : set B), ht, submodule.restrict_scalars_top]⟩
90+
91+
@[priority 100] -- see Note [lower instance priority]
92+
instance finite_type [hRA : finite R A] : algebra.finite_type R A :=
93+
subalgebra.fg_of_submodule_fg hRA
94+
95+
end algebra
96+
97+
end finite
98+
99+
end module
100+
101+
namespace algebra
102+
103+
namespace finite_type
104+
105+
lemma self : finite_type R R := ⟨{1}, subsingleton.elim _ _⟩
106+
107+
section
108+
open_locale classical
109+
110+
protected lemma mv_polynomial (ι : Type*) [fintype ι] : finite_type R (mv_polynomial ι R) :=
111+
⟨finset.univ.image mv_polynomial.X, begin
112+
rw eq_top_iff, refine λ p, mv_polynomial.induction_on' p
113+
(λ u x, finsupp.induction u (subalgebra.algebra_map_mem _ x)
114+
(λ i n f hif hn ih, _))
115+
(λ p q ihp ihq, subalgebra.add_mem _ ihp ihq),
116+
rw [add_comm, mv_polynomial.monomial_add_single],
117+
exact subalgebra.mul_mem _ ih
118+
(subalgebra.pow_mem _ (subset_adjoin $ finset.mem_image_of_mem _ $ finset.mem_univ _) _)
119+
end
120+
end
121+
122+
variables {R A B}
123+
124+
lemma of_surjective (hRA : finite_type R A) (f : A →ₐ[R] B) (hf : surjective f) :
125+
finite_type R B :=
126+
begin
127+
rw [finite_type] at hRA ⊢,
128+
convert subalgebra.fg_map _ f hRA,
129+
simpa only [map_top f, @eq_comm _ ⊤, eq_top_iff, alg_hom.mem_range] using hf
130+
end
131+
132+
lemma equiv (hRA : finite_type R A) (e : A ≃ₐ[R] B) : finite_type R B :=
133+
hRA.of_surjective e e.surjective
134+
135+
lemma trans [algebra A B] [is_scalar_tower R A B] (hRA : finite_type R A) (hAB : finite_type A B) :
136+
finite_type R B :=
137+
fg_trans' hRA hAB
138+
139+
end finite_type
140+
141+
end algebra
142+
143+
end module_and_algebra
144+
145+
namespace ring_hom
146+
variables {A B C : Type*} [comm_ring A] [comm_ring B] [comm_ring C]
147+
148+
/-- A ring morphism `A →+* B` is `finite` if `B` is finitely generated as `A`-module. -/
149+
def finite (f : A →+* B) : Prop :=
150+
by letI : algebra A B := f.to_algebra; exact module.finite A B
151+
152+
/-- A ring morphism `A →+* B` is of `finite_type` if `B` is finitely generated as `A`-algebra. -/
153+
def finite_type (f : A →+* B) : Prop := @algebra.finite_type A B _ _ f.to_algebra
154+
155+
namespace finite
156+
157+
variables (A)
158+
159+
lemma id : finite (ring_hom.id A) := module.finite.self A
160+
161+
variables {A}
162+
163+
lemma of_surjective (f : A →+* B) (hf : surjective f) : f.finite :=
164+
begin
165+
letI := f.to_algebra,
166+
exact module.finite.of_surjective (algebra.of_id A B).to_linear_map hf
167+
end
168+
169+
lemma comp {g : B →+* C} {f : A →+* B} (hg : g.finite) (hf : f.finite) : (g.comp f).finite :=
170+
@module.finite.trans A B C _ _ f.to_algebra _ (g.comp f).to_algebra g.to_algebra
171+
begin
172+
fconstructor,
173+
intros a b c,
174+
simp only [algebra.smul_def, ring_hom.map_mul, mul_assoc],
175+
refl
176+
end
177+
hf hg
178+
179+
lemma finite_type {f : A →+* B} (hf : f.finite) : finite_type f :=
180+
@module.finite.finite_type _ _ _ _ f.to_algebra hf
181+
182+
end finite
183+
184+
namespace finite_type
185+
186+
variables (A)
187+
188+
lemma id : finite_type (ring_hom.id A) := algebra.finite_type.self A
189+
190+
variables {A}
191+
192+
lemma comp_surjective {f : A →+* B} {g : B →+* C} (hf : f.finite_type) (hg : surjective g) :
193+
(g.comp f).finite_type :=
194+
@algebra.finite_type.of_surjective A B C _ _ f.to_algebra _ (g.comp f).to_algebra hf
195+
{ to_fun := g, commutes' := λ a, rfl, .. g } hg
196+
197+
lemma of_surjective (f : A →+* B) (hf : surjective f) : f.finite_type :=
198+
by { rw ← f.comp_id, exact (id A).comp_surjective hf }
199+
200+
lemma comp {g : B →+* C} {f : A →+* B} (hg : g.finite_type) (hf : f.finite_type) :
201+
(g.comp f).finite_type :=
202+
@algebra.finite_type.trans A B C _ _ f.to_algebra _ (g.comp f).to_algebra g.to_algebra
203+
begin
204+
fconstructor,
205+
intros a b c,
206+
simp only [algebra.smul_def, ring_hom.map_mul, mul_assoc],
207+
refl
208+
end
209+
hf hg
210+
211+
end finite_type
212+
213+
end ring_hom
214+
215+
namespace alg_hom
216+
217+
variables {R A B C : Type*} [comm_ring R]
218+
variables [comm_ring A] [comm_ring B] [comm_ring C]
219+
variables [algebra R A] [algebra R B] [algebra R C]
220+
221+
/-- An algebra morphism `A →ₐ[R] B` is finite if it is finite as ring morphism.
222+
In other words, if `B` is finitely generated as `A`-module. -/
223+
def finite (f : A →ₐ[R] B) : Prop := f.to_ring_hom.finite
224+
225+
/-- An algebra morphism `A →ₐ[R] B` is of `finite_type` if it is of finite type as ring morphism.
226+
In other words, if `B` is finitely generated as `A`-algebra. -/
227+
def finite_type (f : A →ₐ[R] B) : Prop := f.to_ring_hom.finite_type
228+
229+
namespace finite
230+
231+
variables (R A)
232+
233+
lemma id : finite (alg_hom.id R A) := ring_hom.finite.id A
234+
235+
variables {R A}
236+
237+
lemma comp {g : B →ₐ[R] C} {f : A →ₐ[R] B} (hg : g.finite) (hf : f.finite) : (g.comp f).finite :=
238+
ring_hom.finite.comp hg hf
239+
240+
lemma of_surjective (f : A →ₐ[R] B) (hf : surjective f) : f.finite :=
241+
ring_hom.finite.of_surjective f hf
242+
243+
lemma finite_type {f : A →ₐ[R] B} (hf : f.finite) : finite_type f :=
244+
ring_hom.finite.finite_type hf
245+
246+
end finite
247+
248+
namespace finite_type
249+
250+
variables (R A)
251+
252+
lemma id : finite_type (alg_hom.id R A) := ring_hom.finite_type.id A
253+
254+
variables {R A}
255+
256+
lemma comp {g : B →ₐ[R] C} {f : A →ₐ[R] B} (hg : g.finite_type) (hf : f.finite_type) :
257+
(g.comp f).finite_type :=
258+
ring_hom.finite_type.comp hg hf
259+
260+
lemma comp_surjective {f : A →ₐ[R] B} {g : B →ₐ[R] C} (hf : f.finite_type) (hg : surjective g) :
261+
(g.comp f).finite_type :=
262+
ring_hom.finite_type.comp_surjective hf hg
263+
264+
lemma of_surjective (f : A →ₐ[R] B) (hf : surjective f) : f.finite_type :=
265+
ring_hom.finite_type.of_surjective f hf
266+
267+
end finite_type
268+
269+
end alg_hom

0 commit comments

Comments
 (0)