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

Commit 01c60b2

Browse files
committed
feat(ring_theory/ring_hom/finite): Finite type is a local property (#15379)
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com>
1 parent cffa031 commit 01c60b2

File tree

4 files changed

+213
-34
lines changed

4 files changed

+213
-34
lines changed

src/algebra/algebra/subalgebra/basic.lean

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Authors: Kenny Lau, Yury Kudryashov
55
-/
66
import algebra.algebra.basic
77
import data.set.Union_lift
8+
import linear_algebra.finsupp
9+
import ring_theory.ideal.operations
810

911
/-!
1012
# Subalgebras over Commutative Semiring
@@ -1064,6 +1066,39 @@ set_like.ext' (set.centralizer_univ A)
10641066

10651067
end centralizer
10661068

1069+
/-- Suppose we are given `∑ i, lᵢ * sᵢ = 1` in `S`, and `S'` a subalgebra of `S` that contains
1070+
`lᵢ` and `sᵢ`. To check that an `x : S` falls in `S'`, we only need to show that
1071+
`r ^ n • x ∈ M'` for some `n` for each `r : s`. -/
1072+
lemma mem_of_span_eq_top_of_smul_pow_mem {S : Type*} [comm_ring S] [algebra R S]
1073+
(S' : subalgebra R S) (s : set S) (l : s →₀ S) (hs : finsupp.total s S S coe l = 1)
1074+
(hs' : s ⊆ S') (hl : ∀ i, l i ∈ S') (x : S)
1075+
(H : ∀ r : s, ∃ (n : ℕ), (r ^ n : S) • x ∈ S') : x ∈ S' :=
1076+
begin
1077+
let s' : set S' := coe ⁻¹' s,
1078+
let e : s' ≃ s := ⟨λ x, ⟨x.1, x.2⟩, λ x, ⟨⟨_, hs' x.2⟩, x.2⟩, λ ⟨⟨_, _⟩, _⟩, rfl, λ ⟨_, _⟩, rfl⟩,
1079+
let l' : s →₀ S' := ⟨l.support, λ x, ⟨_, hl x⟩,
1080+
λ _, finsupp.mem_support_iff.trans $ iff.not $ by { rw ← subtype.coe_inj, refl }⟩,
1081+
have : ideal.span s' = ⊤,
1082+
{ rw [ideal.eq_top_iff_one, ideal.span, finsupp.mem_span_iff_total],
1083+
refine ⟨finsupp.equiv_map_domain e.symm l', subtype.ext $ eq.trans _ hs⟩,
1084+
rw finsupp.total_equiv_map_domain,
1085+
exact finsupp.apply_total _ (algebra.of_id S' S).to_linear_map _ _ },
1086+
obtain ⟨s'', hs₁, hs₂⟩ := (ideal.span_eq_top_iff_finite _).mp this,
1087+
replace H : ∀ r : s'', ∃ (n : ℕ), (r ^ n : S) • x ∈ S' := λ r, H ⟨r, hs₁ r.2⟩,
1088+
choose n₁ n₂ using H,
1089+
let N := s''.attach.sup n₁,
1090+
have hs' := ideal.span_pow_eq_top _ hs₂ N,
1091+
have : ∀ {x : S}, x ∈ (algebra.of_id S' S).range.to_submodule ↔ x ∈ S' :=
1092+
λ x, ⟨by { rintro ⟨x, rfl⟩, exact x.2 }, λ h, ⟨⟨x, h⟩, rfl⟩⟩,
1093+
rw ← this,
1094+
apply (algebra.of_id S' S).range.to_submodule.mem_of_span_top_of_smul_mem _ hs',
1095+
rintro ⟨_, r, hr, rfl⟩,
1096+
convert submodule.smul_mem _ (r ^ (N - n₁ ⟨r, hr⟩)) (this.mpr $ n₂ ⟨r, hr⟩) using 1,
1097+
simp only [_root_.coe_coe, subtype.coe_mk,
1098+
subalgebra.smul_def, smul_smul, ← pow_add, subalgebra.coe_pow],
1099+
rw tsub_add_cancel_of_le (finset.le_sup (s''.mem_attach _) : n₁ ⟨r, hr⟩ ≤ N),
1100+
end
1101+
10671102
end subalgebra
10681103

10691104
section nat

src/ring_theory/adjoin/basic.lean

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,13 @@ begin
270270
congr' 1 with z, simp [submonoid.closure_union, submonoid.mem_sup, set.mem_mul]
271271
end
272272

273-
lemma pow_smul_mem_adjoin_smul (r : R) (s : set A) {x : A} (hx : x ∈ adjoin R s) :
274-
∃ n₀ : ℕ, ∀ n ≥ n₀, r ^ n • x ∈ adjoin R (r • s) :=
273+
variable {R}
274+
275+
lemma pow_smul_mem_of_smul_subset_of_mem_adjoin
276+
[comm_semiring B] [algebra R B] [algebra A B] [is_scalar_tower R A B]
277+
(r : A) (s : set B) (B' : subalgebra R B) (hs : r • s ⊆ B') {x : B} (hx : x ∈ adjoin R s)
278+
(hr : algebra_map A B r ∈ B') :
279+
∃ n₀ : ℕ, ∀ n ≥ n₀, r ^ n • x ∈ B' :=
275280
begin
276281
change x ∈ (adjoin R s).to_submodule at hx,
277282
rw [adjoin_eq_span, finsupp.mem_span_iff_total] at hx,
@@ -280,16 +285,24 @@ begin
280285
use l.support.sup n₁,
281286
intros n hn,
282287
rw finsupp.smul_sum,
283-
refine (adjoin R (r • s)).to_submodule.sum_mem _,
288+
refine B'.to_submodule.sum_mem _,
284289
intros a ha,
285290
have : n ≥ n₁ a := le_trans (finset.le_sup ha) hn,
286291
dsimp only,
287-
rw [← tsub_add_cancel_of_le this, pow_add, ← smul_smul, smul_smul _ (l a), mul_comm,
288-
← smul_smul, adjoin_eq_span],
289-
refine submodule.smul_mem _ _ _,
290-
exact submodule.smul_mem _ _ (submodule.subset_span (n₂ a))
292+
rw [← tsub_add_cancel_of_le this, pow_add, ← smul_smul,
293+
← is_scalar_tower.algebra_map_smul A (l a) (a : B), smul_smul (r ^ n₁ a),
294+
mul_comm, ← smul_smul, smul_def, map_pow, is_scalar_tower.algebra_map_smul],
295+
apply subalgebra.mul_mem _ (subalgebra.pow_mem _ hr _) _,
296+
refine subalgebra.smul_mem _ _ _,
297+
change _ ∈ B'.to_submonoid,
298+
rw ← submonoid.closure_eq B'.to_submonoid,
299+
apply submonoid.closure_mono hs (n₂ a),
291300
end
292301

302+
lemma pow_smul_mem_adjoin_smul (r : R) (s : set A) {x : A} (hx : x ∈ adjoin R s) :
303+
∃ n₀ : ℕ, ∀ n ≥ n₀, r ^ n • x ∈ adjoin R (r • s) :=
304+
pow_smul_mem_of_smul_subset_of_mem_adjoin r s _ subset_adjoin hx (subalgebra.algebra_map_mem _ _)
305+
293306
end comm_semiring
294307

295308
section ring

src/ring_theory/local_properties.lean

Lines changed: 66 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,24 @@ def ring_hom.holds_for_localization_away : Prop :=
111111
∀ ⦃R : Type u⦄ (S : Type u) [comm_ring R] [comm_ring S] [by exactI algebra R S] (r : R)
112112
[by exactI is_localization.away r S], by exactI P (algebra_map R S)
113113

114-
/-- A property `P` of ring homs satisfies `ring_hom.of_localization_span_target`
114+
/-- A property `P` of ring homs satisfies `ring_hom.of_localization_finite_span_target`
115115
if `P` holds for `R →+* S` whenever there exists a finite set `{ r }` that spans `S` such that
116-
`P` holds for `R →+* Sᵣ`. -/
116+
`P` holds for `R →+* Sᵣ`.
117+
118+
Note that this is equivalent to `ring_hom.of_localization_span_target` via
119+
`ring_hom.of_localization_span_target_iff_finite`, but this is easier to prove. -/
120+
def ring_hom.of_localization_finite_span_target : Prop :=
121+
∀ ⦃R S : Type u⦄ [comm_ring R] [comm_ring S] (f : by exactI R →+* S)
122+
(s : finset S) (hs : by exactI ideal.span (s : set S) = ⊤)
123+
(H : by exactI (∀ (r : s), P ((algebra_map S (localization.away (r : S))).comp f))),
124+
by exactI P f
125+
126+
/-- A property `P` of ring homs satisfies `ring_hom.of_localization_span_target`
127+
if `P` holds for `R →+* S` whenever there exists a set `{ r }` that spans `S` such that
128+
`P` holds for `R →+* Sᵣ`.
129+
130+
Note that this is equivalent to `ring_hom.of_localization_finite_span_target` via
131+
`ring_hom.of_localization_span_target_iff_finite`, but this has less restrictions when applying. -/
117132
def ring_hom.of_localization_span_target : Prop :=
118133
∀ ⦃R S : Type u⦄ [comm_ring R] [comm_ring S] (f : by exactI R →+* S)
119134
(s : set S) (hs : by exactI ideal.span s = ⊤)
@@ -148,6 +163,19 @@ begin
148163
exact h s' h₂ (λ x, hs' ⟨_, h₁ x.prop⟩) }
149164
end
150165

166+
lemma ring_hom.of_localization_span_target_iff_finite :
167+
ring_hom.of_localization_span_target @P ↔ ring_hom.of_localization_finite_span_target @P :=
168+
begin
169+
delta ring_hom.of_localization_span_target ring_hom.of_localization_finite_span_target,
170+
apply forall₅_congr, -- TODO: Using `refine` here breaks `resetI`.
171+
introsI,
172+
split,
173+
{ intros h s, exact h s },
174+
{ intros h s hs hs',
175+
obtain ⟨s', h₁, h₂⟩ := (ideal.span_eq_top_iff_finite s).mp hs,
176+
exact h s' h₂ (λ x, hs' ⟨_, h₁ x.prop⟩) }
177+
end
178+
151179
variables {P f R' S'}
152180

153181
lemma _root_.ring_hom.property_is_local.respects_iso (hP : ring_hom.property_is_local @P) :
@@ -543,6 +571,37 @@ lemma localization_away_map_finite_type (r : R) [is_localization.away r R']
543571
(is_localization.away.map R' S' f r).finite_type :=
544572
localization_finite_type.away r hf
545573

574+
variable {S'}
575+
576+
/--
577+
Let `S` be an `R`-algebra, `M` a submonoid of `S`, `S' = M⁻¹S`.
578+
Suppose the image of some `x : S` falls in the adjoin of some finite `s ⊆ S'` over `R`,
579+
and `A` is an `R`-subalgebra of `S` containing both `M` and the numerators of `s`.
580+
Then, there exists some `m : M` such that `m • x` falls in `A`.
581+
-/
582+
lemma is_localization.exists_smul_mem_of_mem_adjoin [algebra R S]
583+
[algebra R S'] [is_scalar_tower R S S'] (M : submonoid S)
584+
[is_localization M S'] (x : S) (s : finset S') (A : subalgebra R S)
585+
(hA₁ : (is_localization.finset_integer_multiple M s : set S) ⊆ A)
586+
(hA₂ : M ≤ A.to_submonoid)
587+
(hx : algebra_map S S' x ∈ algebra.adjoin R (s : set S')) :
588+
∃ m : M, m • x ∈ A :=
589+
begin
590+
let g : S →ₐ[R] S' := is_scalar_tower.to_alg_hom R S S',
591+
let y := is_localization.common_denom_of_finset M s,
592+
have hx₁ : (y : S) • ↑s = g '' _ := (is_localization.finset_integer_multiple_image _ s).symm,
593+
obtain ⟨n, hn⟩ := algebra.pow_smul_mem_of_smul_subset_of_mem_adjoin (y : S) (s : set S')
594+
(A.map g) (by { rw hx₁, exact set.image_subset _ hA₁ }) hx (set.mem_image_of_mem _ (hA₂ y.2)),
595+
obtain ⟨x', hx', hx''⟩ := hn n (le_of_eq rfl),
596+
rw [algebra.smul_def, ← _root_.map_mul] at hx'',
597+
obtain ⟨a, ha₂⟩ := (is_localization.eq_iff_exists M S').mp hx'',
598+
use a * y ^ n,
599+
convert A.mul_mem hx' (hA₂ a.2),
600+
convert ha₂.symm,
601+
simp only [submonoid.smul_def, submonoid.coe_pow, smul_eq_mul, submonoid.coe_mul],
602+
ring,
603+
end
604+
546605
/--
547606
Let `S` be an `R`-algebra, `M` an submonoid of `R`, and `S' = M⁻¹S`.
548607
If the image of some `x : S` falls in the adjoin of some finite `s ⊆ S'` over `R`,
@@ -556,30 +615,10 @@ lemma is_localization.lift_mem_adjoin_finset_integer_multiple [algebra R S]
556615
∃ m : M, m • x ∈ algebra.adjoin R
557616
(is_localization.finset_integer_multiple (M.map (algebra_map R S : R →* S)) s : set S) :=
558617
begin
559-
-- mirrors the proof of `is_localization.smul_mem_finset_integer_multiple_span`
560-
let g : S →ₐ[R] S' := alg_hom.mk' (algebra_map S S')
561-
(λ c x, by simp [algebra.algebra_map_eq_smul_one]),
562-
563-
let y := is_localization.common_denom_of_finset (M.map (algebra_map R S : R →* S)) s,
564-
have hx₁ : (y : S) • ↑s = g '' _ := (is_localization.finset_integer_multiple_image _ s).symm,
565-
obtain ⟨y', hy', e : algebra_map R S y' = y⟩ := y.prop,
566-
have : algebra_map R S y' • (s : set S') = y' • s :=
567-
by simp_rw [algebra.algebra_map_eq_smul_one, smul_assoc, one_smul],
568-
rw [← e, this] at hx₁,
569-
replace hx₁ := congr_arg (algebra.adjoin R) hx₁,
570-
obtain ⟨n, hn⟩ := algebra.pow_smul_mem_adjoin_smul _ y' (s : set S') hx,
571-
specialize hn n (le_of_eq rfl),
572-
erw [hx₁, ← g.map_smul, ← g.map_adjoin] at hn,
573-
obtain ⟨x', hx', hx''⟩ := hn,
574-
obtain ⟨⟨_, a, ha₁, rfl⟩, ha₂⟩ := (is_localization.eq_iff_exists
575-
(M.map (algebra_map R S : R →* S)) S').mp hx'',
576-
use (⟨a, ha₁⟩ : M) * (⟨y', hy'⟩ : M) ^ n,
577-
convert (algebra.adjoin R (is_localization.finset_integer_multiple
578-
(submonoid.map (algebra_map R S : R →* S) M) s : set S)).smul_mem hx' a using 1,
579-
convert ha₂.symm,
580-
{ rw [mul_comm (y' ^ n • x), subtype.coe_mk, submonoid.smul_def, submonoid.coe_mul, ← smul_smul,
581-
algebra.smul_def, submonoid_class.coe_pow], refl },
582-
{ rw mul_comm, exact algebra.smul_def _ _ }
618+
obtain ⟨⟨_, a, ha, rfl⟩, e⟩ := is_localization.exists_smul_mem_of_mem_adjoin
619+
(M.map (algebra_map R S : R →* S)) x s (algebra.adjoin R _) algebra.subset_adjoin _ hx,
620+
{ exact ⟨⟨a, ha⟩, by simpa [submonoid.smul_def] using e⟩ },
621+
{ rintros _ ⟨a, ha, rfl⟩, exact subalgebra.algebra_map_mem _ a }
583622
end
584623

585624
lemma finite_type_of_localization_span : ring_hom.of_localization_span @ring_hom.finite_type :=
@@ -613,7 +652,7 @@ begin
613652
rw [submonoid.smul_def, algebra.smul_def, is_scalar_tower.algebra_map_apply R S,
614653
subtype.coe_mk, ← map_mul] at hn₁,
615654
obtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ := is_localization.lift_mem_adjoin_finset_integer_multiple
616-
(submonoid.powers (r : R)) (localization.away (f r)) _ (s₁ r) hn₁,
655+
(submonoid.powers (r : R)) _ (s₁ r) hn₁,
617656
rw [submonoid.smul_def, ← algebra.smul_def, smul_smul, subtype.coe_mk, ← pow_add] at hn₂,
618657
use n₂ + n₁,
619658
refine le_supr (λ (x : s), algebra.adjoin R (sf x : set S)) r _,
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/-
2+
Copyright (c) 2021 Andrew Yang. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Andrew Yang
5+
-/
6+
import ring_theory.local_properties
7+
import ring_theory.localization.inv_submonoid
8+
9+
/-!
10+
11+
# The meta properties of finite-type ring homomorphisms.
12+
13+
The main result is `ring_hom.finite_is_local`.
14+
15+
-/
16+
17+
namespace ring_hom
18+
19+
open_locale pointwise
20+
21+
lemma finite_type_stable_under_composition :
22+
stable_under_composition @finite_type :=
23+
by { introv R hf hg, exactI hg.comp hf }
24+
25+
lemma finite_type_holds_for_localization_away :
26+
holds_for_localization_away @finite_type :=
27+
begin
28+
introv R _,
29+
resetI,
30+
suffices : algebra.finite_type R S,
31+
{ change algebra.finite_type _ _, convert this, ext, rw algebra.smul_def, refl },
32+
exact is_localization.finite_type_of_monoid_fg (submonoid.powers r) S,
33+
end
34+
35+
lemma finite_type_of_localization_span_target : of_localization_span_target @finite_type :=
36+
begin
37+
-- Setup algebra intances.
38+
rw of_localization_span_target_iff_finite,
39+
introv R hs H,
40+
resetI,
41+
classical,
42+
letI := f.to_algebra,
43+
replace H : ∀ r : s, algebra.finite_type R (localization.away (r : S)),
44+
{ intro r, convert H r, ext, rw algebra.smul_def, refl },
45+
replace H := λ r, (H r).1,
46+
constructor,
47+
-- Suppose `s : finset S` spans `S`, and each `Sᵣ` is finitely generated as an `R`-algebra.
48+
-- Say `t r : finset Sᵣ` generates `Sᵣ`. By assumption, we may find `lᵢ` such that
49+
-- `∑ lᵢ * sᵢ = 1`. I claim that all `s` and `l` and the numerators of `t` and generates `S`.
50+
choose t ht using H,
51+
obtain ⟨l, hl⟩ := (finsupp.mem_span_iff_total S (s : set S) 1).mp
52+
(show (1 : S) ∈ ideal.span (s : set S), by { rw hs, trivial }),
53+
let sf := λ (x : s), is_localization.finset_integer_multiple (submonoid.powers (x : S)) (t x),
54+
use s.attach.bUnion sf ∪ s ∪ l.support.image l,
55+
rw eq_top_iff,
56+
-- We need to show that every `x` falls in the subalgebra generated by those elements.
57+
-- Since all `s` and `l` are in the subalgebra, it suffices to check that `sᵢ ^ nᵢ • x` falls in
58+
-- the algebra for each `sᵢ` and some `nᵢ`.
59+
rintro x -,
60+
apply subalgebra.mem_of_span_eq_top_of_smul_pow_mem _ (s : set S) l hl _ _ x _,
61+
{ intros x hx,
62+
apply algebra.subset_adjoin,
63+
rw [finset.coe_union, finset.coe_union],
64+
exact or.inl (or.inr hx) },
65+
{ intros i,
66+
by_cases h : l i = 0, { rw h, exact zero_mem _ },
67+
apply algebra.subset_adjoin,
68+
rw [finset.coe_union, finset.coe_image],
69+
exact or.inr (set.mem_image_of_mem _ (finsupp.mem_support_iff.mpr h)) },
70+
{ intro r,
71+
rw [finset.coe_union, finset.coe_union, finset.coe_bUnion],
72+
-- Since all `sᵢ` and numerators of `t r` are in the algebra, it suffices to show that the
73+
-- image of `x` in `Sᵣ` falls in the `R`-adjoin of `t r`, which is of course true.
74+
obtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ := is_localization.exists_smul_mem_of_mem_adjoin
75+
(submonoid.powers (r : S)) x (t r)
76+
(algebra.adjoin R _) _ _ _,
77+
{ exact ⟨n₂, hn₂⟩ },
78+
{ intros x hx,
79+
apply algebra.subset_adjoin,
80+
refine or.inl (or.inl ⟨_, ⟨r, rfl⟩, _, ⟨s.mem_attach r, rfl⟩, hx⟩) },
81+
{ rw [submonoid.powers_eq_closure, submonoid.closure_le, set.singleton_subset_iff],
82+
apply algebra.subset_adjoin,
83+
exact or.inl (or.inr r.2) },
84+
{ rw ht, trivial } }
85+
end
86+
87+
lemma finite_is_local :
88+
property_is_local @finite_type :=
89+
⟨localization_finite_type, finite_type_of_localization_span_target,
90+
finite_type_stable_under_composition, finite_type_holds_for_localization_away⟩
91+
92+
end ring_hom

0 commit comments

Comments
 (0)