Stafford38/Characteristic/BGab001CoefficientFieldTrace.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Characteristic.SourceActionCommutatorExpansion
3 public import Mathlib.RingTheory.Finiteness.NilpotentKer
4 public import Mathlib.RingTheory.HopkinsLevitzki
5 
6 @[expose] public section
7 
8 /-!
9 # Actual traces using coefficient-field corrections
10 
11 The first-order source equations can be chosen with correction coefficients
12 in the coefficient field. Their commutators then have their actual matrix
13 traces. The remaining source matrix has arbitrary special-fibre coefficients,
14 but sends each basis vector to a strictly deeper maximal-ideal layer. This
15 is sufficient to kill its diagonal without replacing coefficients by residues.
16 -/
17 
18 namespace Stafford38.Characteristic.BGab001CoefficientFieldTrace
19 
20 open Matrix
21 open Stafford38.Characteristic.ArtinianAdaptedBasisTraceAdapter
22 open Stafford38.Characteristic.ConcreteEquation33SourceMatrices
23 open Stafford38.Characteristic.ConcreteInducedZAction
24 open Stafford38.Characteristic.SourceActionCommutatorExpansion
25 
26 noncomputable section
27 
28 universe u
29 variable {K R V : Type u} [Field K] [CommRing R] [Algebra K R]
30 variable [IsLocalRing R] [AddCommGroup V] [Module K V] [Module R V]
31 variable [IsScalarTower K R V] {n : ℕ}
32 local notation "ι" => Fin (n + 1)
33 
34 /-- An arbitrary ring coefficient cannot bring a vector from a deeper adic
35 layer back to the diagonal of an adapted basis. -/
36 theorem repr_smul_eq_zero_of_level_lt
37     (b : Module.Basis ι K V) (level : ι → ℕ)
38     (hb : IsMaximalIdealFiltrationAdapted (IsLocalRing.maximalIdeal R) b level)
39     (a : R) (i j : ι) (hij : level i < level j) :
40     b.repr (a • b j) i = 0 := by
41   have hj : b j ∈ (IsLocalRing.maximalIdeal R) ^ level j •
42       (⊤ : Submodule R V) := by
43     have hs : b j ∈ Submodule.span K (b '' {l | level j ≤ level l}) :=
44       (b.self_mem_span_image).mpr (show level j ≤ level j from le_rfl)
45     rw [← hb.power_span (level j)] at hs
46     exact hs
47   have ha := ((IsLocalRing.maximalIdeal R) ^ level j •
48       (⊤ : Submodule R V)).smul_mem a hj
49   have hs : a • b j ∈ Submodule.span K (b '' {l | level j ≤ level l}) := by
50     rw [← hb.power_span (level j)]
51     exact ha
52   by_contra hne
53   have hi := b.repr_support_subset_of_mem_span _ hs
54     (Finsupp.mem_support_iff.mpr hne)
55   exact (not_le_of_gt hij) hi
56 
57 /-- The diagonal of a whole source row vanishes when every nonzero entry
58 points to a strictly deeper layer. No term is reduced to the residue field. -/
59 theorem repr_deeper_source_row_diagonal_eq_zero
60     (b : Module.Basis ι K V) (level : ι → ℕ)
61     (hb : IsMaximalIdealFiltrationAdapted (IsLocalRing.maximalIdeal R) b level)
62     (M : Matrix ι ι R)
63     (hM : ∀ i j, level j ≤ level i → M i j = 0) (i : ι) :
64     b.repr (∑ j, M i j • b j) i = 0 := by
65   rw [map_sum, Finsupp.finsetSum_apply]
66   apply Finset.sum_eq_zero
67   intro j _
68   by_cases hij : level j ≤ level i
69   · simp [hM i j hij]
70   · exact repr_smul_eq_zero_of_level_lt b level hb _ i j (lt_of_not_ge hij)
71 
72 /-- Actual action trace from a deeper-layer remainder and a coefficient-field
73 correction. This consumes action on basis vectors, not a residue matrix. -/
74 theorem actual_trace_eq_correction_trace
75     (b : Module.Basis ι K V) (level : ι → ℕ)
76     (hb : IsMaximalIdealFiltrationAdapted (IsLocalRing.maximalIdeal R) b level)
77     (T : Module.End K V) (M : Matrix ι ι R) (Q : Matrix ι ι K)
78     (hM : ∀ i j, level j ≤ level i → M i j = 0)
79     (hT : ∀ i, T (b i) = (∑ j, M i j • b j) + ∑ j, Q i j • b j) :
80     Matrix.trace (LinearMap.toMatrix b b T) = Matrix.trace Q := by
81   unfold Matrix.trace
82   apply Finset.sum_congr rfl
83   intro i _
84   change LinearMap.toMatrix b b T i i = Q i i
85   rw [LinearMap.toMatrix_apply, hT i, map_add, Finsupp.add_apply,
86     repr_deeper_source_row_diagonal_eq_zero b level hb M hM i, zero_add]
87   simp [Finsupp.single_apply]
88 
89 /-- Both correction commutators have trace zero over the coefficient field. -/
90 theorem actual_trace_eq_zero_of_coefficientField_corrections
91     (b : Module.Basis ι K V) (level : ι → ℕ)
92     (hb : IsMaximalIdealFiltrationAdapted (IsLocalRing.maximalIdeal R) b level)
93     (T : Module.End K V) (M : Matrix ι ι R)
94     (A B Gamma Theta : Matrix ι ι K)
95     (hM : ∀ i j, level j ≤ level i → M i j = 0)
96     (hT : ∀ i, T (b i) = (∑ j, M i j • b j) +
97       ∑ j, (B * Gamma - Gamma * B + (Theta * A - A * Theta)) i j • b j) :
98     Matrix.trace (LinearMap.toMatrix b b T) = 0 := by
99   rw [actual_trace_eq_correction_trace b level hb T M _ hM hT,
100     Matrix.trace_add, Matrix.trace_sub, Matrix.trace_sub,
101     Matrix.trace_mul_comm B Gamma, Matrix.trace_mul_comm Theta A]
102   ring
103 
104 /-- The source-row matrix of a maximal-ideal action points strictly deeper
105 in the adapted filtration, independently of the ordering within a layer. -/
106 theorem source_coefficients_deeper
107     (b : Module.Basis ι K V) (level : ι → ℕ)
108     (hb : IsMaximalIdealFiltrationAdapted (IsLocalRing.maximalIdeal R) b level)
109     (a : R) (ha : a ∈ IsLocalRing.maximalIdeal R) :
110     ∀ i j, level j ≤ level i → b.repr (a • b i) j = 0 := by
111   intro i j hij
112   have hi : b i ∈ (IsLocalRing.maximalIdeal R) ^ level i •
113       (⊤ : Submodule R V) := by
114     have hs : b i ∈ Submodule.span K (b '' {l | level i ≤ level l}) :=
115       (b.self_mem_span_image).mpr (show level i ≤ level i from le_rfl)
116     rw [← hb.power_span (level i)] at hs
117     exact hs
118   have hs : a • b i ∈ Submodule.span K (b '' {l | level i + 1 ≤ level l}) := by
119     rw [← hb.power_span (level i + 1)]
120     exact maximalIdeal_smul_mem_succ_power ha hi
121   by_contra hne
122   have hj := b.repr_support_subset_of_mem_span _ hs
123     (Finsupp.mem_support_iff.mpr hne)
124   change level i + 1 ≤ level j at hj
125   omega
126 
127 section SourceRing
128 variable {B W : Type u} [Ring B] [AddCommGroup W] [Module B W]
129 
130 private theorem deeper_mul
131     (level : ι → ℕ) (M N : Matrix ι ι B)
132     (hM : ∀ i j, level j ≤ level i → M i j = 0)
133     (hN : ∀ i j, level j ≤ level i → N i j = 0) :
134     ∀ i j, level j ≤ level i → (M * N) i j = 0 := by
135   intro i j hij
136   rw [Matrix.mul_apply]
137   apply Finset.sum_eq_zero
138   intro l _
139   by_cases hl : level l ≤ level i
140   · rw [hM i l hl, zero_mul]
141   · rw [hN l j (hij.trans (le_of_lt (lt_of_not_ge hl))), mul_zero]
142 
143 /-- Gabber's local trace step from the actual square-zero module. Both
144 first-order correction matrices are produced over the coefficient field;
145 all parameter cofactors are produced with their deeper-layer support. -/
146 theorem actual_commutator_cofactor_trace_eq_zero
147     (S : LeftPrincipalParameterReduction (B := B) (Abar := R))
148     (rho : W →+ V) (hrho : Function.Surjective rho)
149     (hact : ∀ a w, rho (a • w) = S.modParameter a • rho w)
150     (hker : AddMonoidHom.ker rho =
151       AddMonoidHom.range (parameterAct (W := W) S.parameter))
152     (hexact : AddMonoidHom.ker (parameterAct (W := W) S.parameter) =
153       AddMonoidHom.range (parameterAct (W := W) S.parameter))
154     (hc2 : S.parameter * S.parameter = 0)
155     (b : Module.Basis ι K V) (level : ι → ℕ)
156     (hb : IsMaximalIdealFiltrationAdapted (IsLocalRing.maximalIdeal R) b level)
157     (x y z : B) (hx : S.modParameter x ∈ IsLocalRing.maximalIdeal R)
158     (hy : S.modParameter y ∈ IsLocalRing.maximalIdeal R)
159     (hxy : x * y - y * x = S.parameter * z) :
160     Matrix.trace (LinearMap.toMatrix b b
161       (leftMultiplicationEnd (K := K) (V := V) (S.modParameter z))) = 0 := by
162   classical
163   let Ax := leftMultiplicationEnd (K := K) (V := V) (S.modParameter x)
164   let By := leftMultiplicationEnd (K := K) (V := V) (S.modParameter y)
165   let A0 := (LinearMap.toMatrix b b Ax)ᵀ
166   let B0 := (LinearMap.toMatrix b b By)ᵀ
167   let A := liftedSourceActionMatrix S b Ax
168   let Bm := liftedSourceActionMatrix S b By
169   have hAmap : A.map S.modParameter = A0.map (algebraMap K R) := by
170     rw [liftedSourceActionMatrix_map, sourceActionCoefficients_eq_transpose_toMatrix_map]
171   have hBmap : Bm.map S.modParameter = B0.map (algebraMap K R) := by
172     rw [liftedSourceActionMatrix_map, sourceActionCoefficients_eq_transpose_toMatrix_map]
173   obtain ⟨Gamma, GammaK, hGamma, heqx⟩ :=
174     exists_firstOrderSourceActionMatrix_over_coefficientField S rho hrho hact hker hc2 b x
175   obtain ⟨Theta, ThetaK, hTheta, heqy⟩ :=
176     exists_firstOrderSourceActionMatrix_over_coefficientField S rho hrho hact hker hc2 b y
177   have hAz : ∀ i j, level j ≤ level i → A i j = 0 := by
178     intro i j hij
179     simp [A, liftedSourceActionMatrix, liftMatrix, sourceActionCoefficients, Ax,
180       source_coefficients_deeper b level hb _ hx i j hij]
181   have hBz : ∀ i j, level j ≤ level i → Bm i j = 0 := by
182     intro i j hij
183     simp [Bm, liftedSourceActionMatrix, liftMatrix, sourceActionCoefficients, By,
184       source_coefficients_deeper b level hb _ hy i j hij]
185   have hcomm : Bm.map S.modParameter * A.map S.modParameter =
186       A.map S.modParameter * Bm.map S.modParameter := by
187     rw [hAmap, hBmap, ← Matrix.map_mul, ← Matrix.map_mul]
188     congr 1
189     dsimp [A0, B0]
190     rw [← Matrix.transpose_mul, ← Matrix.transpose_mul,
191       ← LinearMap.toMatrix_mul, ← LinearMap.toMatrix_mul]
192     congr 2
193     ext v
194     exact smul_comm _ _ v
195   let X := factorMatrix S (scalarMatrixCommutator x Bm)
196   let Y := factorMatrix S (scalarMatrixCommutator y A)
197   let Omega := factorMatrix S (sourceMatrixCommutator Bm A)
198   have hXz : ∀ i j, level j ≤ level i → X i j = 0 := by
199     intro i j hij
200     simp [X, factorMatrix, scalarMatrixCommutator, hBz i j hij]
201   have hYz : ∀ i j, level j ≤ level i → Y i j = 0 := by
202     intro i j hij
203     simp [Y, factorMatrix, scalarMatrixCommutator, hAz i j hij]
204   have hOz : ∀ i j, level j ≤ level i → Omega i j = 0 := by
205     intro i j hij
206     simp [Omega, factorMatrix, sourceMatrixCommutator,
207       deeper_mul level Bm A hBz hAz i j hij, deeper_mul level A Bm hAz hBz i j hij]
208   let Rem := (X - Y + Omega).map S.modParameter
209   have hRem : ∀ i j, level j ≤ level i → Rem i j = 0 := by
210     intro i j hij
211     simp [Rem, Matrix.map_apply, hXz i j hij, hYz i j hij, hOz i j hij]
212   have hfc : S.modParameter S.parameter = 0 := by
213     apply (S.kernel_left _).mpr
214     exact ⟨1, mul_one _⟩
215   have heq (i : ι) := rho_commutator_on_source_equations
216     S.parameter x y z S.modParameter rho S.parameter_comm hc2 hfc hxy hact hexact
217     A Bm Gamma Theta X Y Omega (liftedBasisVector rho hrho b) heqx heqy
218     (parameter_mul_factorMatrix S _ (scalarMatrixCommutator_map_eq_zero S x Bm))
219     (parameter_mul_factorMatrix S _ (scalarMatrixCommutator_map_eq_zero S y A))
220     (parameter_mul_factorMatrix S _ (sourceMatrixCommutator_map_eq_zero S Bm A hcomm)) i
221   let Q := B0 * GammaK - GammaK * B0 + (ThetaK * A0 - A0 * ThetaK)
222   have hmap : (sourceExpansionMatrix X Y Omega A Bm Gamma Theta).map S.modParameter =
223       Rem + Q.map (algebraMap K R) := by
224     have hAe i j := congrArg (fun M : Matrix ι ι R ↦ M i j) hAmap
225     have hBe i j := congrArg (fun M : Matrix ι ι R ↦ M i j) hBmap
226     have hGe i j := congrArg (fun M : Matrix ι ι R ↦ M i j) hGamma
227     have hTe i j := congrArg (fun M : Matrix ι ι R ↦ M i j) hTheta
228     simp only [Matrix.map_apply] at hAe hBe hGe hTe
229     ext i j
230     simp only [sourceExpansionMatrix, Rem, Q, Matrix.map_apply, Matrix.add_apply,
231       Matrix.sub_apply, Matrix.mul_apply, map_add, map_sub, map_sum, map_mul,
232       hAe, hBe, hGe, hTe]
233     abel
234   apply actual_trace_eq_zero_of_coefficientField_corrections b level hb _ Rem
235     A0 B0 GammaK ThetaK hRem
236   intro i
237   have heqi := heq i
238   simp only [rho_liftedBasisVector] at heqi
239   exact heqi.trans (by
240     change (∑ j, ((sourceExpansionMatrix X Y Omega A Bm Gamma Theta).map
241       S.modParameter) i j • b j) = _
242     rw [hmap]
243     simp only [Matrix.add_apply, Matrix.map_apply, add_smul, Finset.sum_add_distrib,
244       IsScalarTower.algebraMap_smul]
245     simp only [Q, Matrix.add_apply, add_smul, Finset.sum_add_distrib])
246 
247 /-- The local membership conclusion after choosing a coefficient field and
248 an adapted basis. The residue scalar is forced to zero by the actual trace. -/
249 theorem commutator_cofactor_mem_maximalIdeal
250     [CharZero K] [IsArtinianRing R]
251     (S : LeftPrincipalParameterReduction (B := B) (Abar := R))
252     (rho : W →+ V) (hrho : Function.Surjective rho)
253     (hact : ∀ a w, rho (a • w) = S.modParameter a • rho w)
254     (hker : AddMonoidHom.ker rho =
255       AddMonoidHom.range (parameterAct (W := W) S.parameter))
256     (hexact : AddMonoidHom.ker (parameterAct (W := W) S.parameter) =
257       AddMonoidHom.range (parameterAct (W := W) S.parameter))
258     (hc2 : S.parameter * S.parameter = 0)
259     (b : Module.Basis ι K V) (level : ι → ℕ)
260     (hb : IsMaximalIdealFiltrationAdapted (IsLocalRing.maximalIdeal R) b level)
261     (hcoeff : Function.Surjective
262       ((IsLocalRing.residue R).comp (algebraMap K R)))
263     (x y z : B) (hx : S.modParameter x ∈ IsLocalRing.maximalIdeal R)
264     (hy : S.modParameter y ∈ IsLocalRing.maximalIdeal R)
265     (hxy : x * y - y * x = S.parameter * z) :
266     S.modParameter z ∈ IsLocalRing.maximalIdeal R := by
267   obtain ⟨q, hq⟩ := hcoeff (IsLocalRing.residue R (S.modParameter z))
268   let r := S.modParameter z - algebraMap K R q
269   have hr : r ∈ IsLocalRing.maximalIdeal R := by
270     rw [← IsLocalRing.residue_eq_zero_iff]
271     change IsLocalRing.residue R (S.modParameter z - algebraMap K R q) = 0
272     rw [map_sub, show IsLocalRing.residue R (algebraMap K R q) =
273       IsLocalRing.residue R (S.modParameter z) from hq, sub_self]
274   have hz : S.modParameter z = algebraMap K R q + r := by dsimp [r]; ring
275   have htrace := actual_commutator_cofactor_trace_eq_zero
276     S rho hrho hact hker hexact hc2 b level hb x y z hx hy hxy
277   have hq0 := Stafford38.Characteristic.ArtinianTriangularTrace.scalar_eq_zero_of_trace_identity
278     q _ _ (leftMultiplicationMatrix_isNilpotent b hr) htrace
279     (leftMultiplicationMatrix_decomposition b q r (S.modParameter z) hz).symm
280   simpa [r, hq0] using hr
281 
282 /-- An Artinian local algebra is finite over a coefficient field. -/
283 theorem finite_over_coefficientField [IsArtinianRing R]
284     (hcoeff : Function.Surjective
285       ((IsLocalRing.residue R).comp (algebraMap K R))) : Module.Finite K R := by
286   let m := IsLocalRing.maximalIdeal R
287   letI : Module.Finite K (R ⧸ m) :=
288     Module.Finite.of_surjective (Algebra.linearMap K (R ⧸ m)) hcoeff
289   apply Module.finite_of_surjective_of_ker_le_nilradical
290     (Ideal.Quotient.mkₐ K m) Ideal.Quotient.mk_surjective
291   · have hker : RingHom.ker (Ideal.Quotient.mkₐ K m) = m := by
292       ext z
293       exact Ideal.Quotient.eq_zero_iff_mem
294     rw [hker]
295     exact (Ideal.FG.isNilpotent_iff_le_nilradical
296       (IsNoetherian.noetherian m)).mp
297       (Stafford38.Characteristic.ArtinianCoefficientField.maximalIdeal_isNilpotent (R := R))
298   · exact IsNoetherian.noetherian _
299 
300 /-- Local Gabber membership with the finite-dimensional basis constructed
301 from the finite special-fibre module. No action matrix or trace is supplied. -/
302 theorem artinian_local_commutator_cofactor_mem_maximalIdeal
303     [CharZero K] [IsArtinianRing R] [Module.Finite R V] [Nontrivial V]
304     (S : LeftPrincipalParameterReduction (B := B) (Abar := R))
305     (rho : W →+ V) (hrho : Function.Surjective rho)
306     (hact : ∀ a w, rho (a • w) = S.modParameter a • rho w)
307     (hker : AddMonoidHom.ker rho =
308       AddMonoidHom.range (parameterAct (W := W) S.parameter))
309     (hexact : AddMonoidHom.ker (parameterAct (W := W) S.parameter) =
310       AddMonoidHom.range (parameterAct (W := W) S.parameter))
311     (hc2 : S.parameter * S.parameter = 0)
312     (hcoeff : Function.Surjective
313       ((IsLocalRing.residue R).comp (algebraMap K R)))
314     (x y z : B) (hx : S.modParameter x ∈ IsLocalRing.maximalIdeal R)
315     (hy : S.modParameter y ∈ IsLocalRing.maximalIdeal R)
316     (hxy : x * y - y * x = S.parameter * z) :
317     S.modParameter z ∈ IsLocalRing.maximalIdeal R := by
318   letI : Module.Finite K R := finite_over_coefficientField hcoeff
319   letI : Module.Finite K V := Module.Finite.trans R V
320   obtain ⟨n, hn⟩ := Nat.exists_eq_succ_of_ne_zero
321     (ne_of_gt (Module.finrank_pos (R := K) (M := V)))
322   obtain ⟨b, level, hb⟩ :=
323     Stafford38.Characteristic.ArtinianAdaptedBasisExistence.exists_maximalIdealFiltrationAdaptedBasis
324       (K := K) (R := R) (V := V) hn
325   exact commutator_cofactor_mem_maximalIdeal S rho hrho hact hker hexact hc2
326     b level hb hcoeff x y z hx hy hxy
327 
328 end SourceRing
329 
330 section CoefficientFieldProduction
331 
332 variable {B W : Type u}
333 variable [Ring B] [AddCommGroup W] [Module B W]
334 
335 omit [Algebra K R] [Module K V] [IsScalarTower K R V] in
336 /-- Proposition 3.2 for a nonzero finite special fibre: the coefficient
337 field, finite basis, source corrections, and actual trace are all produced. -/
338 theorem artinian_local_cofactor_mem_maximalIdeal
339     (F : Type u) [Field F] [CharZero F] [Algebra F R]
340     [IsArtinianRing R] [Module.Finite R V] [Nontrivial V]
341     (S : LeftPrincipalParameterReduction (B := B) (Abar := R))
342     (rho : W →+ V) (hrho : Function.Surjective rho)
343     (hact : ∀ a w, rho (a • w) = S.modParameter a • rho w)
344     (hker : AddMonoidHom.ker rho =
345       AddMonoidHom.range (parameterAct (W := W) S.parameter))
346     (hexact : AddMonoidHom.ker (parameterAct (W := W) S.parameter) =
347       AddMonoidHom.range (parameterAct (W := W) S.parameter))
348     (hc2 : S.parameter * S.parameter = 0)
349     (x y z : B) (hx : S.modParameter x ∈ IsLocalRing.maximalIdeal R)
350     (hy : S.modParameter y ∈ IsLocalRing.maximalIdeal R)
351     (hxy : x * y - y * x = S.parameter * z) :
352     S.modParameter z ∈ IsLocalRing.maximalIdeal R := by
353   let κ := IsLocalRing.ResidueField R
354   obtain ⟨s, hs⟩ := Stafford38.Characteristic.ArtinianCoefficientField.exists_residue_section F R
355   letI : CharZero κ := charZero_of_injective_algebraMap (algebraMap F κ).injective
356   letI : Algebra κ R := s.toRingHom.toAlgebra
357   letI : Module κ V := Module.compHom V (algebraMap κ R)
358   letI : IsScalarTower κ R V := IsScalarTower.of_algebraMap_smul fun _ _ ↦ rfl
359   have hcoeff : Function.Surjective
360       ((IsLocalRing.residue R).comp (algebraMap κ R)) := fun a ↦ ⟨a, hs a⟩
361   exact artinian_local_commutator_cofactor_mem_maximalIdeal
362     S rho hrho hact hker hexact hc2 hcoeff x y z hx hy hxy
363 
364 end CoefficientFieldProduction
365 
366 #print axioms repr_smul_eq_zero_of_level_lt
367 #print axioms repr_deeper_source_row_diagonal_eq_zero
368 #print axioms actual_trace_eq_zero_of_coefficientField_corrections
369 #print axioms actual_commutator_cofactor_trace_eq_zero
370 #print axioms commutator_cofactor_mem_maximalIdeal
371 #print axioms artinian_local_commutator_cofactor_mem_maximalIdeal
372 #print axioms artinian_local_cofactor_mem_maximalIdeal
373 
374 end
375 end Stafford38.Characteristic.BGab001CoefficientFieldTrace
376