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

Commit 405ea5c

Browse files
committed
feat(ring_theory/ring_hom/surjective): Meta properties about the surjectivity of ring homomorphisms (#17292)
Also generalize several lemmas
1 parent fb7698e commit 405ea5c

File tree

5 files changed

+118
-39
lines changed

5 files changed

+118
-39
lines changed

src/algebra/algebra/subalgebra/basic.lean

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,36 +1057,41 @@ end centralizer
10571057
/-- Suppose we are given `∑ i, lᵢ * sᵢ = 1` in `S`, and `S'` a subalgebra of `S` that contains
10581058
`lᵢ` and `sᵢ`. To check that an `x : S` falls in `S'`, we only need to show that
10591059
`r ^ n • x ∈ M'` for some `n` for each `r : s`. -/
1060-
lemma mem_of_span_eq_top_of_smul_pow_mem {S : Type*} [comm_ring S] [algebra R S]
1061-
(S' : subalgebra R S) (s : set S) (l : s →₀ S) (hs : finsupp.total s S S coe l = 1)
1062-
(hs' : s ⊆ S') (hl : ∀ i, l i ∈ S') (x : S)
1063-
(H : ∀ r : s, ∃ (n : ℕ), (r ^ n : S) • x ∈ S') : x ∈ S' :=
1060+
lemma mem_of_finset_sum_eq_one_of_pow_smul_mem {S : Type*} [comm_ring S]
1061+
[algebra R S] (S' : subalgebra R S) {ι : Type*} (ι' : finset ι) (s : ι → S) (l : ι → S)
1062+
(e : ∑ i in ι', l i * s i = 1)
1063+
(hs : ∀ i, s i ∈ S') (hl : ∀ i, l i ∈ S') (x : S)
1064+
(H : ∀ i, ∃ (n : ℕ), (s i ^ n : S) • x ∈ S') : x ∈ S' :=
10641065
begin
1065-
let s' : set S' := coe ⁻¹' s,
1066-
let e : s' ≃ s := ⟨λ x, ⟨x.1, x.2⟩, λ x, ⟨⟨_, hs' x.2⟩, x.2⟩, λ ⟨⟨_, _⟩, _⟩, rfl, λ ⟨_, _⟩, rfl⟩,
1067-
let l' : s →₀ S' := ⟨l.support, λ x, ⟨_, hl x⟩,
1068-
λ _, finsupp.mem_support_iff.trans $ iff.not $ by { rw ← subtype.coe_inj, refl }⟩,
1069-
have : ideal.span s' = ⊤,
1066+
classical,
1067+
suffices : x ∈ (algebra.of_id S' S).range.to_submodule,
1068+
{ obtain ⟨x, rfl⟩ := this, exact x.2 },
1069+
choose n hn using H,
1070+
let s' : ι → S' := λ x, ⟨s x, hs x⟩,
1071+
have : ideal.span (s' '' ι')= ⊤,
10701072
{ rw [ideal.eq_top_iff_one, ideal.span, finsupp.mem_span_iff_total],
1071-
refine ⟨finsupp.equiv_map_domain e.symm l', subtype.ext $ eq.trans _ hs⟩,
1072-
rw finsupp.total_equiv_map_domain,
1073-
exact finsupp.apply_total _ (algebra.of_id S' S).to_linear_map _ _ },
1074-
obtain ⟨s'', hs₁, hs₂⟩ := (ideal.span_eq_top_iff_finite _).mp this,
1075-
replace H : ∀ r : s'', ∃ (n : ℕ), (r ^ n : S) • x ∈ S' := λ r, H ⟨r, hs₁ r.2⟩,
1076-
choose n₁ n₂ using H,
1077-
let N := s''.attach.sup n₁,
1078-
have hs' := ideal.span_pow_eq_top _ hs₂ N,
1079-
have : ∀ {x : S}, x ∈ (algebra.of_id S' S).range.to_submodule ↔ x ∈ S' :=
1080-
λ x, ⟨by { rintro ⟨x, rfl⟩, exact x.2 }, λ h, ⟨⟨x, h⟩, rfl⟩⟩,
1081-
rw ← this,
1073+
refine ⟨(finsupp.of_support_finite (λ i : ι', (⟨l i, hl i⟩ : S')) (set.to_finite _))
1074+
.map_domain $ λ i, ⟨s' i, i, i.2, rfl⟩, S'.to_submodule.injective_subtype _⟩,
1075+
rw [finsupp.total_map_domain, finsupp.total_apply, finsupp.sum_fintype,
1076+
map_sum, submodule.subtype_apply, subalgebra.coe_one],
1077+
{ exact finset.sum_attach.trans e },
1078+
{ exact λ _, zero_smul _ _ } },
1079+
let N := ι'.sup n,
1080+
have hs' := ideal.span_pow_eq_top _ this N,
10821081
apply (algebra.of_id S' S).range.to_submodule.mem_of_span_top_of_smul_mem _ hs',
1083-
rintro ⟨_, r, hr, rfl⟩,
1084-
convert submodule.smul_mem _ (r ^ (N - n₁ ⟨r, hr⟩)) (this.mpr $ n₂ ⟨r, hr⟩) using 1,
1085-
simp only [_root_.coe_coe, subtype.coe_mk,
1086-
subalgebra.smul_def, smul_smul, ← pow_add, subalgebra.coe_pow],
1087-
rw tsub_add_cancel_of_le (finset.le_sup (s''.mem_attach _) : n₁ ⟨r, hr⟩ ≤ N),
1082+
rintros ⟨_, _, ⟨i, hi, rfl⟩, rfl⟩,
1083+
change s i ^ N • x ∈ _,
1084+
rw [← tsub_add_cancel_of_le (show n i ≤ N, from finset.le_sup hi), pow_add, mul_smul],
1085+
refine submodule.smul_mem _ (⟨_, pow_mem (hs i) _⟩ : S') _,
1086+
exact ⟨⟨_, hn i⟩, rfl⟩,
10881087
end
10891088

1089+
lemma mem_of_span_eq_top_of_smul_pow_mem {S : Type*} [comm_ring S] [algebra R S]
1090+
(S' : subalgebra R S) (s : set S) (l : s →₀ S) (hs : finsupp.total s S S coe l = 1)
1091+
(hs' : s ⊆ S') (hl : ∀ i, l i ∈ S') (x : S)
1092+
(H : ∀ r : s, ∃ (n : ℕ), (r ^ n : S) • x ∈ S') : x ∈ S' :=
1093+
mem_of_finset_sum_eq_one_of_pow_smul_mem S' l.support coe l hs (λ x, hs' x.2) hl x H
1094+
10901095
end subalgebra
10911096

10921097
section nat

src/algebra/module/projective.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ begin
121121
use coprod (lmap_domain R R (inl R P Q)) (lmap_domain R R (inr R P Q)) ∘ₗ sP.prod_map sQ,
122122
ext; simp only [coe_inl, coe_inr, coe_comp, function.comp_app, prod_map_apply, map_zero,
123123
coprod_apply, lmap_domain_apply, map_domain_zero, add_zero, zero_add, id_comp,
124-
total_map_domain R _ (prod.mk.inj_right (0 : Q)),
125-
total_map_domain R _ (prod.mk.inj_left (0 : P))],
124+
total_map_domain],
126125

127126
{ rw [←fst_apply _, apply_total R], exact hsP x, },
128127
{ rw [←snd_apply _, apply_total R], exact finsupp.total_zero_apply _ (sP x), },
@@ -148,7 +147,7 @@ begin
148147
use dfinsupp.coprod_map f ∘ₗ dfinsupp.map_range.linear_map s,
149148

150149
ext i x j,
151-
simp only [dfinsupp.coprod_map, direct_sum.lof, total_map_domain R _ dfinsupp.single_injective,
150+
simp only [dfinsupp.coprod_map, direct_sum.lof, total_map_domain,
152151
coe_comp, coe_lsum, id_coe, linear_equiv.coe_to_linear_map, finsupp_lequiv_dfinsupp_symm_apply,
153152
function.comp_app, dfinsupp.lsingle_apply, dfinsupp.map_range.linear_map_apply,
154153
dfinsupp.map_range_single, lmap_domain_apply, dfinsupp.to_finsupp_single,

src/linear_algebra/finsupp.lean

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -493,23 +493,21 @@ theorem lmap_domain_total (f : α → α') (g : M →ₗ[R] M') (h : ∀ i, g (v
493493
(finsupp.total α' M' R v').comp (lmap_domain R R f) = g.comp (finsupp.total α M R v) :=
494494
by ext l; simp [total_apply, finsupp.sum_map_domain_index, add_smul, h]
495495

496+
theorem total_comp_lmap_domain (f : α → α') :
497+
(finsupp.total α' M' R v').comp (finsupp.lmap_domain R R f) = (finsupp.total α M' R (v' ∘ f)) :=
498+
by { ext, simp }
499+
496500
@[simp] theorem total_emb_domain (f : α ↪ α') (l : α →₀ R) :
497501
(finsupp.total α' M' R v') (emb_domain f l) = (finsupp.total α M' R (v' ∘ f)) l :=
498502
by simp [total_apply, finsupp.sum, support_emb_domain, emb_domain_apply]
499503

500-
theorem total_map_domain (f : α → α') (hf : function.injective f) (l : α →₀ R) :
504+
@[simp] theorem total_map_domain (f : α → α') (l : α →₀ R) :
501505
(finsupp.total α' M' R v') (map_domain f l) = (finsupp.total α M' R (v' ∘ f)) l :=
502-
begin
503-
have : map_domain f l = emb_domain ⟨f, hf⟩ l,
504-
{ rw emb_domain_eq_map_domain ⟨f, hf⟩,
505-
refl },
506-
rw this,
507-
apply total_emb_domain R ⟨f, hf⟩ l
508-
end
506+
linear_map.congr_fun (total_comp_lmap_domain _ _) l
509507

510508
@[simp] theorem total_equiv_map_domain (f : α ≃ α') (l : α →₀ R) :
511509
(finsupp.total α' M' R v') (equiv_map_domain f l) = (finsupp.total α M' R (v' ∘ f)) l :=
512-
by rw [equiv_map_domain_eq_map_domain, total_map_domain _ _ f.injective]
510+
by rw [equiv_map_domain_eq_map_domain, total_map_domain]
513511

514512
/-- A version of `finsupp.range_total` which is useful for going in the other direction -/
515513
theorem span_eq_range_total (s : set M) :

src/linear_algebra/linear_independent.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,8 +882,7 @@ begin
882882
{ dsimp only [l],
883883
rw finsupp.total_map_domain,
884884
rw (hv.comp f f.injective).total_repr,
885-
{ refl },
886-
{ exact f.injective } },
885+
{ refl } },
887886
have h_total_eq : (finsupp.total ι M R v) l = (finsupp.total ι M R v) (finsupp.single i 1),
888887
by rw [h_total_l, finsupp.total_single, one_smul],
889888
have l_eq : l = _ := linear_map.ker_eq_bot.1 hv h_total_eq,
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/-
2+
Copyright (c) 2022 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+
8+
/-!
9+
10+
# The meta properties of surjective ring homomorphisms.
11+
12+
-/
13+
14+
namespace ring_hom
15+
16+
open_locale tensor_product
17+
18+
open tensor_product algebra.tensor_product
19+
20+
local notation `surjective` := λ {X Y : Type*} [comm_ring X] [comm_ring Y] ,
21+
by exactI λ (f : X →+* Y), function.surjective f
22+
23+
lemma surjective_stable_under_composition :
24+
stable_under_composition surjective :=
25+
by { introv R hf hg, exactI hg.comp hf }
26+
27+
lemma surjective_respects_iso :
28+
respects_iso surjective :=
29+
begin
30+
apply surjective_stable_under_composition.respects_iso,
31+
introsI,
32+
exact e.surjective
33+
end
34+
35+
lemma surjective_stable_under_base_change :
36+
stable_under_base_change surjective :=
37+
begin
38+
classical,
39+
introv R h,
40+
resetI,
41+
intro x,
42+
induction x using tensor_product.induction_on with x y x y ex ey,
43+
{ exact ⟨0, map_zero _⟩ },
44+
{ obtain ⟨y, rfl⟩ := h y, use y • x, dsimp,
45+
rw [tensor_product.smul_tmul, algebra.algebra_map_eq_smul_one] },
46+
{ obtain ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩ := ⟨ex, ey⟩, exact ⟨x + y, map_add _ x y⟩ }
47+
end
48+
49+
open_locale big_operators
50+
51+
lemma surjective_of_localization_span :
52+
of_localization_span surjective :=
53+
begin
54+
introv R hs H,
55+
resetI,
56+
letI := f.to_algebra,
57+
show function.surjective (algebra.of_id R S),
58+
rw [← algebra.range_top_iff_surjective, eq_top_iff],
59+
rintro x -,
60+
obtain ⟨l, hl⟩ :=
61+
(finsupp.mem_span_iff_total R s 1).mp (show _ ∈ ideal.span s, by { rw hs, trivial }),
62+
fapply subalgebra.mem_of_finset_sum_eq_one_of_pow_smul_mem _
63+
l.support (λ x : s, f x) (λ x : s, f (l x)),
64+
{ dsimp only, simp_rw [← _root_.map_mul, ← map_sum, ← f.map_one], exact f.congr_arg hl },
65+
{ exact λ _, set.mem_range_self _ },
66+
{ exact λ _, set.mem_range_self _ },
67+
{ intro r,
68+
obtain ⟨y, hy⟩ := H r (is_localization.mk' _ x (1 : submonoid.powers (f r))),
69+
obtain ⟨z, ⟨_, n, rfl⟩, rfl⟩ := is_localization.mk'_surjective (submonoid.powers (r : R)) y,
70+
erw [is_localization.map_mk', is_localization.eq] at hy,
71+
obtain ⟨⟨_, m, rfl⟩, hm⟩ := hy,
72+
dsimp at hm,
73+
simp_rw [_root_.mul_assoc, _root_.one_mul, ← map_pow, ← f.map_mul, ← pow_add, mul_comm x] at hm,
74+
rw map_pow at hm,
75+
refine ⟨n + m, _, hm⟩ }
76+
end
77+
78+
end ring_hom

0 commit comments

Comments
 (0)