Stafford38/Paper/Section6/Cyclicity.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 
3 public import Stafford38.Paper.Section2
4 public import AlgebraicAnalysis.Ore.RightIntersection
5 public import Mathlib.Tactic.NoncommRing
6 
7 @[expose] public section
8 
9 /-!
10 # The proof of Corollary 6.3 (tex 1598–1621), paragraph by paragraph
11 
12 `A` is a ring without zero divisors satisfying the right Ore condition (for
13 `A_n(k)`, `weyl_rightOreCondition`), `T` a right `A`-module (a module over
14 `Aᵐᵒᵖ`; `t • op a` is written `ta`), and `1 = dR + FdS` holds for every nonzero
15 `d` (Theorem 1.1).  The corollary itself, `Stafford38.Paper.corollary_6_3`, is
16 in `Stafford38.Paper.Main`.
17 -/
18 
19 namespace Stafford38.Paper.Section6
20 
21 open AlgebraicAnalysis.OreRightIntersection
22 
23 universe u v
24 
25 variable {A : Type u} [Ring A] {T : Type v} [AddCommGroup T] [Module Aᵐᵒᵖ T]
26 
27 /-- `φ : A ⊕ A → T`, `φ(r, s) = t₁r + t₂s`. -/
28 def phi63 (t₁ t₂ : T) : (A × A) →ₗ[Aᵐᵒᵖ] T where
29   toFun z := (MulOpposite.op z.1 : Aᵐᵒᵖ) • t₁ + (MulOpposite.op z.2 : Aᵐᵒᵖ) • t₂
30   map_add' z w := by
31     simp only [Prod.fst_add, Prod.snd_add, MulOpposite.op_add, add_smul]
32     abel
33   map_smul' c z := by
34     simp only [Prod.smul_fst, Prod.smul_snd, MulOpposite.smul_eq_mul_unop,
35       MulOpposite.op_mul, MulOpposite.op_unop, smul_add, smul_smul, RingHom.id_apply]
36 
37 /-- "This map is surjective, since `t₁, t₂` generate all of `T`": the image of
38 `φ` is `t₁A + t₂A`. -/
39 theorem step_6_3_phi_range (t₁ t₂ : T) :
40     LinearMap.range (phi63 (A := A) t₁ t₂) = Submodule.span Aᵐᵒᵖ ({t₁, t₂} : Set T) := by
41   apply le_antisymm
42   · rintro z ⟨⟨a, b⟩, rfl⟩
43     exact Submodule.add_mem _ (Submodule.smul_mem _ _ (Submodule.subset_span (by simp)))
44       (Submodule.smul_mem _ _ (Submodule.subset_span (by simp)))
45   · apply Submodule.span_le.2
46     intro z hz
47     simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hz
48     rcases hz with rfl | rfl
49     · exact ⟨(1, 0), by simp [phi63]⟩
50     · exact ⟨(0, 1), by simp [phi63]⟩
51 
52 /-- "`T` is torsion": `t₁d₁ = t₂d₂ = 0` with `d₁, d₂ ≠ 0`.  "`A_n` is a right
53 Ore domain": `d₁r₁ = d₂r₂ ≠ 0`, and `d := d₁r₁ = d₂r₂` is a common annihilator. -/
54 theorem step_6_3_common_annihilator (hOre : RightOreCondition A)
55     (htorsion : Stafford38.Paper.Section2.IsTorsion A T) (t₁ t₂ : T) :
56     ∃ d : A, d ≠ 0 ∧ (MulOpposite.op d : Aᵐᵒᵖ) • t₁ = 0 ∧
57       (MulOpposite.op d : Aᵐᵒᵖ) • t₂ = 0 := by
58   obtain ⟨d₁, hd₁, h₁⟩ := htorsion t₁
59   obtain ⟨d₂, hd₂, h₂⟩ := htorsion t₂
60   obtain ⟨r₁, r₂, hr, hne⟩ := hOre hd₁ hd₂
61   refine ⟨d₁ * r₁, hne, ?_, ?_⟩
62   · rw [MulOpposite.op_mul, mul_smul, h₁, smul_zero]
63   · rw [hr, MulOpposite.op_mul, mul_smul, h₂, smul_zero]
64 
65 /-- "`(d, 0)` and `(0, d)` are elements in `M = ker φ`", hence
66 `(d, 0)S + (0, d)R = (dS, dR) = (dS, 1 - FdS) =: (a, 1 - Fa) ∈ M`; and
67 `φ(1, -F) = t₁ - t₂F`. -/
68 theorem step_6_3_kernel (t₁ t₂ : T) (d F R S : A)
69     (h₁ : (MulOpposite.op d : Aᵐᵒᵖ) • t₁ = 0) (h₂ : (MulOpposite.op d : Aᵐᵒᵖ) • t₂ = 0)
70     (hcert : (1 : A) = d * R + F * d * S) :
71     ((d, 0) : A × A) ∈ LinearMap.ker (phi63 t₁ t₂) ∧
72       ((0, d) : A × A) ∈ LinearMap.ker (phi63 t₁ t₂) ∧
73       (MulOpposite.op S : Aᵐᵒᵖ) • ((d, 0) : A × A) + (MulOpposite.op R : Aᵐᵒᵖ) • (0, d) =
74         (d * S, 1 - F * (d * S)) ∧
75       ((d * S, 1 - F * (d * S)) : A × A) ∈ LinearMap.ker (phi63 t₁ t₂) ∧
76       phi63 t₁ t₂ (1, -F) = t₁ - (MulOpposite.op F : Aᵐᵒᵖ) • t₂ := by
77   have hd0 : ((d, 0) : A × A) ∈ LinearMap.ker (phi63 t₁ t₂) := by
78     change (MulOpposite.op d : Aᵐᵒᵖ) • t₁ + (MulOpposite.op (0 : A) : Aᵐᵒᵖ) • t₂ = 0
79     rw [h₁, MulOpposite.op_zero, zero_smul, add_zero]
80   have h0d : ((0, d) : A × A) ∈ LinearMap.ker (phi63 t₁ t₂) := by
81     change (MulOpposite.op (0 : A) : Aᵐᵒᵖ) • t₁ + (MulOpposite.op d : Aᵐᵒᵖ) • t₂ = 0
82     rw [h₂, MulOpposite.op_zero, zero_smul, add_zero]
83   have hcomb : (MulOpposite.op S : Aᵐᵒᵖ) • ((d, 0) : A × A) +
84       (MulOpposite.op R : Aᵐᵒᵖ) • (0, d) = (d * S, 1 - F * (d * S)) := by
85     simp only [Prod.smul_mk, MulOpposite.smul_eq_mul_unop, MulOpposite.unop_op, zero_mul,
86       Prod.mk_add_mk, add_zero, zero_add, Prod.mk.injEq, true_and]
87     rw [hcert]
88     noncomm_ring
89   refine ⟨hd0, h0d, hcomb, ?_, ?_⟩
90   · rw [← hcomb]
91     exact Submodule.add_mem _ (Submodule.smul_mem _ _ hd0) (Submodule.smul_mem _ _ h0d)
92   · change (MulOpposite.op (1 : A) : Aᵐᵒᵖ) • t₁ + (MulOpposite.op (-F) : Aᵐᵒᵖ) • t₂ = _
93     simp [sub_eq_add_neg]
94 
95 /-- "`A_n ⊕ A_n` can be generated by `(a, 1 - Fa)` and `(1, -F)`":
96 `(x, y) = (a, 1 - Fa)u + (1, -F)v` with `u = y + Fx` and `v = x - a(y + Fx)`. -/
97 theorem step_6_3_generators (a F : A) :
98     (∀ x y : A, ((x, y) : A × A) =
99       (MulOpposite.op (y + F * x) : Aᵐᵒᵖ) • (a, 1 - F * a) +
100         (MulOpposite.op (x - a * (y + F * x)) : Aᵐᵒᵖ) • (1, -F)) ∧
101       Submodule.span Aᵐᵒᵖ ({(a, 1 - F * a), (1, -F)} : Set (A × A)) = ⊤ := by
102   have hid : ∀ x y : A, ((x, y) : A × A) =
103       (MulOpposite.op (y + F * x) : Aᵐᵒᵖ) • (a, 1 - F * a) +
104         (MulOpposite.op (x - a * (y + F * x)) : Aᵐᵒᵖ) • (1, -F) := by
105     intro x y
106     simp only [Prod.smul_mk, MulOpposite.smul_eq_mul_unop, MulOpposite.unop_op,
107       Prod.mk_add_mk, one_mul, Prod.mk.injEq]
108     constructor <;> noncomm_ring
109   refine ⟨hid, top_unique ?_⟩
110   rintro ⟨x, y⟩ -
111   rw [hid x y]
112   exact Submodule.add_mem _ (Submodule.smul_mem _ _ (Submodule.subset_span (by simp)))
113     (Submodule.smul_mem _ _ (Submodule.subset_span (by simp)))
114 
115 /-- "Since `A_n ⊕ A_n` can be generated by `(a, 1 - Fa)` and `(1, -F)` and
116 `(a, 1 - Fa) ∈ M`, `T ≅ (A_n ⊕ A_n)/M` can be generated by
117 `φ(1, -F) = t₁ - t₂F`": the image `t₁A + t₂A` of `φ` is generated by
118 `t₁ - t₂F`.  (For `l = 1` this is also the stable-cyclicity statement with
119 `f₁ = -F`.) -/
120 theorem step_6_3_pair (t₁ t₂ : T) (d F R S : A)
121     (h₁ : (MulOpposite.op d : Aᵐᵒᵖ) • t₁ = 0) (h₂ : (MulOpposite.op d : Aᵐᵒᵖ) • t₂ = 0)
122     (hcert : (1 : A) = d * R + F * d * S) :
123     Submodule.span Aᵐᵒᵖ ({t₁ - (MulOpposite.op F : Aᵐᵒᵖ) • t₂} : Set T) =
124       Submodule.span Aᵐᵒᵖ ({t₁, t₂} : Set T) := by
125   obtain ⟨-, -, -, hzero, hgen⟩ := step_6_3_kernel t₁ t₂ d F R S h₁ h₂ hcert
126   rw [← step_6_3_phi_range, ← Submodule.map_top, ← (step_6_3_generators (d * S) F).2,
127     Submodule.map_span, Set.image_pair, LinearMap.mem_ker.mp hzero, hgen]
128   apply le_antisymm
129   · exact Submodule.span_mono (by simp)
130   · apply Submodule.span_le.2
131     intro z hz
132     simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hz
133     rcases hz with rfl | rfl
134     · exact Submodule.zero_mem _
135     · exact Submodule.subset_span rfl
136 
137 /-- Stafford's notion [Sta78, p. 435]: `T` is *stably `m`-generated* if for
138 every `l ≥ m` and generators `a_1, …, a_{l+1}` of `T` there are `f_i ∈ A` such
139 that `a_i + a_{l+1} f_i`, `i = 1, …, l`, generate `T`.  Stably cyclic is `m = 1`. -/
140 def IsStablyGenerated (A : Type u) [Ring A] (T : Type v) [AddCommGroup T] [Module Aᵐᵒᵖ T]
141     (m : ℕ) : Prop :=
142   ∀ l ≥ m, ∀ a : Fin (l + 1) → T, Submodule.span Aᵐᵒᵖ (Set.range a) = ⊤ →
143     ∃ f : Fin l → A, Submodule.span Aᵐᵒᵖ
144       (Set.range fun i : Fin l => a i.castSucc + (MulOpposite.op (f i) : Aᵐᵒᵖ) • a (Fin.last l)) =
145         ⊤
146 
147 /-- The two-generator part of the cited theorem [Sta78, Thm. 3.7] (right-module
148 version), proved here from the identity `1 = dR + FdS` rather than by
149 Stafford's argument: for a finite generating set `{x} ∪ s`, collapsing `s` to
150 one generator `y` by repeating `step_6_3_pair` gives the two generators
151 `t₁ = x`, `t₂ = y`. -/
152 theorem two_generators_of_identity (hOre : RightOreCondition A)
153     (hone : ∀ d : A, d ≠ 0 → ∃ F R S : A, (1 : A) = d * R + F * d * S)
154     (htorsion : Stafford38.Paper.Section2.IsTorsion A T) [Module.Finite Aᵐᵒᵖ T] :
155     ∃ t₁ t₂ : T, Submodule.span Aᵐᵒᵖ ({t₁, t₂} : Set T) = ⊤ := by
156   classical
157   have hcollapse (s : Finset T) :
158       ∃ z : T, Submodule.span Aᵐᵒᵖ (s : Set T) = Submodule.span Aᵐᵒᵖ ({z} : Set T) := by
159     induction s using Finset.induction_on with
160     | empty => exact ⟨0, by simp⟩
161     | @insert x s _ ih =>
162         obtain ⟨y, hy⟩ := ih
163         obtain ⟨d, hd, hx, hyd⟩ := step_6_3_common_annihilator hOre htorsion x y
164         obtain ⟨F, R, S, hcert⟩ := hone d hd
165         refine ⟨x - (MulOpposite.op F : Aᵐᵒᵖ) • y, ?_⟩
166         rw [step_6_3_pair x y d F R S hx hyd hcert, Finset.coe_insert, Submodule.span_insert,
167           hy, ← Submodule.span_union, Set.singleton_union]
168   obtain ⟨s, hs⟩ := (Module.Finite.fg_top : (⊤ : Submodule Aᵐᵒᵖ T).FG)
169   rcases s.eq_empty_or_nonempty with rfl | ⟨x, hx⟩
170   · exact ⟨0, 0, by rw [← hs]; simp⟩
171   · obtain ⟨y, hy⟩ := hcollapse (s.erase x)
172     refine ⟨x, y, ?_⟩
173     rw [← hs, ← Finset.insert_erase hx, Finset.coe_insert, Submodule.span_insert,
174       Submodule.span_insert, hy]
175 
176 /-- Replacing `a_1` by `a_1 - a_{l+1}F` (`step_6_3_pair`) and keeping
177 `a_2, …, a_l`: with `1 = dR + FdS` for a common annihilator `d` of `a_1` and
178 `a_{l+1}`, the stable-generation property holds for every `l ≥ 1`. -/
179 theorem stably_generated_of_identity (hOre : RightOreCondition A)
180     (hone : ∀ d : A, d ≠ 0 → ∃ F R S : A, (1 : A) = d * R + F * d * S)
181     (htorsion : Stafford38.Paper.Section2.IsTorsion A T) : IsStablyGenerated A T 1 := by
182   classical
183   intro l hl a ha
184   obtain ⟨d, hd, h₁, h₂⟩ := step_6_3_common_annihilator hOre htorsion (a 0) (a (Fin.last l))
185   obtain ⟨F, R, S, hcert⟩ := hone d hd
186   let i₀ : Fin l := ⟨0, hl⟩
187   refine ⟨fun i => if i = i₀ then -F else 0, ?_⟩
188   have hpair := step_6_3_pair (a 0) (a (Fin.last l)) d F R S h₁ h₂ hcert
189   rw [eq_top_iff, ← ha, Submodule.span_le]
190   rintro _ ⟨j, rfl⟩
191   let U := Submodule.span Aᵐᵒᵖ (Set.range fun i : Fin l =>
192     a i.castSucc + (MulOpposite.op (if i = i₀ then -F else 0) : Aᵐᵒᵖ) • a (Fin.last l))
193   have hmem0 : a 0 - (MulOpposite.op F : Aᵐᵒᵖ) • a (Fin.last l) ∈ U := by
194     refine Submodule.subset_span ⟨i₀, ?_⟩
195     simp only [↓reduceIte, MulOpposite.op_neg, neg_smul, sub_eq_add_neg]
196     rfl
197   have hpairU : Submodule.span Aᵐᵒᵖ ({a 0, a (Fin.last l)} : Set T) ≤ U := by
198     rw [← hpair, Submodule.span_le, Set.singleton_subset_iff]
199     exact hmem0
200   by_cases hj0 : j = 0
201   · subst hj0
202     exact hpairU (Submodule.subset_span (by simp))
203   by_cases hjl : j = Fin.last l
204   · subst hjl
205     exact hpairU (Submodule.subset_span (by simp))
206   · obtain ⟨i, rfl⟩ := Fin.exists_castSucc_eq.mpr hjl
207     have hi : i ≠ i₀ := fun h => hj0 (by rw [h]; rfl)
208     refine Submodule.subset_span ⟨i, ?_⟩
209     simp [hi]
210 
211 /-- **Proof of Corollary 6.3**, given the cited theorem [Sta78, Thm. 3.7]
212 (`h37`: `T` is generated by two elements and stably two-generated).  Take
213 generators `t₁, t₂` (`h37`), `φ(r, s) = t₁r + t₂s` onto `T`, a common
214 annihilator `d = d₁r₁ = d₂r₂` (Ore condition), `1 = dR + FdS`; then
215 `(a, 1 - Fa) ∈ M = ker φ` and `(a, 1 - Fa), (1, -F)` generate `A ⊕ A`, so `T`
216 is generated by `φ(1, -F) = t₁ - t₂F`.  The closing remark, stable
217 cyclicity: for `l = 1` choose `f_1 = -F` (`step_6_3_pair`); for `l ≥ 2` it is
218 the stable two-generation of `h37`. -/
219 theorem corollary_6_3_of (hOre : RightOreCondition A)
220     (hone : ∀ d : A, d ≠ 0 → ∃ F R S : A, (1 : A) = d * R + F * d * S)
221     (htorsion : Stafford38.Paper.Section2.IsTorsion A T)
222     (h37 : (∃ t₁ t₂ : T, Submodule.span Aᵐᵒᵖ ({t₁, t₂} : Set T) = ⊤) ∧
223       IsStablyGenerated A T 2) :
224     Stafford38.Paper.Section2.IsCyclic A T ∧ IsStablyGenerated A T 1 := by
225   obtain ⟨⟨t₁, t₂, ht⟩, h2⟩ := h37
226   obtain ⟨d, hd, h₁, h₂⟩ := step_6_3_common_annihilator hOre htorsion t₁ t₂
227   obtain ⟨F, R, S, hcert⟩ := hone d hd
228   refine ⟨(Stafford38.Paper.Section2.isCyclic_iff_span A T).2
229     ⟨_, (step_6_3_pair t₁ t₂ d F R S h₁ h₂ hcert).trans ht⟩, ?_⟩
230   intro l hl a ha
231   rcases Nat.lt_or_ge l 2 with hl2 | hl2
232   · obtain rfl : l = 1 := by omega
233     obtain ⟨d', hd', h₁', h₂'⟩ := step_6_3_common_annihilator hOre htorsion (a 0) (a 1)
234     obtain ⟨F', R', S', hcert'⟩ := hone d' hd'
235     refine ⟨fun _ => -F', ?_⟩
236     have hrange : (Set.range fun i : Fin 1 =>
237         a i.castSucc + (MulOpposite.op (-F') : Aᵐᵒᵖ) • a (Fin.last 1)) =
238         {a 0 - (MulOpposite.op F' : Aᵐᵒᵖ) • a 1} := by
239       ext z
240       simp [sub_eq_add_neg, Fin.last]
241       exact eq_comm
242     have hpair2 : ({a 0, a 1} : Set T) = Set.range a := by
243       ext z
244       simp [Fin.exists_fin_two, eq_comm]
245     rw [hrange, step_6_3_pair (a 0) (a 1) d' F' R' S' h₁' h₂' hcert', hpair2, ha]
246   · exact h2 l hl2 a ha
247 
248 #print axioms two_generators_of_identity
249 #print axioms stably_generated_of_identity
250 #print axioms step_6_3_phi_range
251 #print axioms step_6_3_common_annihilator
252 #print axioms step_6_3_kernel
253 #print axioms step_6_3_generators
254 #print axioms step_6_3_pair
255 #print axioms corollary_6_3_of
256 
257 end Stafford38.Paper.Section6
258