Stafford38/Geometry/PaperResidueDerivationFrame.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Geometry.KaehlerSpanSeparableAdjoin
3 public import Stafford38.Geometry.KaehlerVisibleDerivationFrame
4 public import Stafford38.Geometry.ResidueMinorSelection
5 public import Stafford38.Geometry.RetainedProjectiveCompletion
6 public import Stafford38.Geometry.RelativeRetainedBoundaryPlace
7 public import Stafford38.Geometry.CompletedDVRPowerSeriesEquiv
8 public import Stafford38.Geometry.CompletedDVRCoefficientSection
9 
10 @[expose] public section
11 
12 /-!
13 # Derivations visible in the retained residue coordinates
14 
15 For a completed divisor chart, the residues of its projective coordinates
16 generate an intermediate field.  If the full residue field is algebraic over
17 that field, the existing Kähler-span theorem produces a dual derivation frame
18 on those same coordinates.  This module is the concrete interface between a
19 retained residue-coordinate family and the coefficientwise tangent columns.
20 -/
21 
22 namespace Stafford38.Geometry.PaperResidueDerivationFrame
23 
24 open IsLocalRing
25 open Stafford38.Geometry.AsymptoticDivisorExistence
26 open Stafford38.Geometry.KaehlerSpanSeparableAdjoin
27 open Stafford38.Geometry.KaehlerVisibleDerivationFrame
28 open Stafford38.GeometryResidueMinorSelection
29 open Stafford38.GeometrySplitTangentMatrix
30 open Stafford38.Geometry.RetainedProjectiveCompletion
31 open Stafford38.Geometry.RelativeRetainedBoundaryPlace
32 open Stafford38.Geometry.RelativeCoefficientDVR
33 open Stafford38.Geometry.CompletedDVRPowerSeries
34 open Stafford38.Geometry.CompletedDVRCoefficientSection
35 
36 noncomputable section
37 
38 universe u v
39 
40 variable {k κ : Type u} [Field k] [Field κ] [Algebra k κ] [CharZero k]
41 
42 set_option maxHeartbeats 4000000
43 set_option synthInstance.maxHeartbeats 400000
44 
45 /-- The actual completed retained divisor chart has the expected residue
46 coordinates: its constant-coefficient map is the residue map of the retained
47 DVR. -/
48 theorem constantCoeff_retainedToCompleted_eq_residue
49     {K : Type u} [Field K] [Algebra k K] {x : K}
50     (W : Data k K x) :
51     letI : Algebra (CoordinateZeroLocalRing W.coefficientField) K :=
52       W.ambientAlgebra
53     let V := W.place.valuation.toSubring
54     letI : IsDiscreteValuationRing V := W.place.isDiscrete
55     letI : Algebra W.coefficientField V :=
56       (relativeCoefficientMap W.coefficientField W.place).toAlgebra
57     ∀ v : V,
58       PowerSeries.constantCoeff (retainedToCompletedPowerSeries W v) =
59         residue V v := by
60   letI : Algebra (CoordinateZeroLocalRing W.coefficientField) K :=
61     W.ambientAlgebra
62   let V := W.place.valuation.toSubring
63   letI : IsDiscreteValuationRing V := W.place.isDiscrete
64   letI : Algebra W.coefficientField V :=
65     (relativeCoefficientMap W.coefficientField W.place).toAlgebra
66   let hsep := relativeResidue_isSeparable W.coefficientField W.place
67   let ψ : PowerSeries (ResidueField V) →+* ResidueField V :=
68     (completedResidue W.coefficientField V).toRingHom.comp
69       W.completedPowerSeriesEquiv.toRingHom
70   have hC (a : ResidueField V) : ψ (PowerSeries.C a) = a := by
71     change (completedResidue W.coefficientField V)
72       (W.completedPowerSeriesEquiv (PowerSeries.C a)) = a
73     change (completedResidue W.coefficientField V)
74       (completedDVRPowerSeriesMap W.coefficientField V hsep (PowerSeries.C a)) = a
75     rw [completedDVRPowerSeriesMap_C]
76     exact DFunLike.congr_fun
77       (completedResidue_comp_completedCoefficientSection
78         W.coefficientField V hsep) a
79   have hres (v : V) :
80       completedResidue W.coefficientField V
81         (algebraMap V (AdicCompletion (maximalIdeal V) V) v) = residue V v := by
82     simp [completedResidue, adicJetResidue]
83   have hXcomp :
84       completedDVRPowerSeriesMap W.coefficientField V hsep PowerSeries.X =
85         algebraMap V (AdicCompletion (maximalIdeal V) V)
86           (chosenUniformizer V) := by
87     rw [completedDVRPowerSeriesMap_X, AdicCompletion.algebraMap_apply]
88     rfl
89   have hX : ψ PowerSeries.X = 0 := by
90     change (completedResidue W.coefficientField V)
91       (completedDVRPowerSeriesMap W.coefficientField V hsep PowerSeries.X) = 0
92     rw [hXcomp, hres]
93     apply (IsLocalRing.residue_eq_zero_iff (chosenUniformizer V)).mpr
94     change chosenUniformizer V ∈ maximalIdeal V
95     rw [maximalIdeal_eq_span_chosenUniformizer]
96     exact Ideal.mem_span_singleton_self _
97   have hψ : ψ = PowerSeries.constantCoeff := by
98     apply RingHom.ext
99     intro f
100     have heq := congrArg ψ (PowerSeries.eq_shift_mul_X_add_const f)
101     rw [map_add, map_mul, hX, mul_zero, zero_add, hC] at heq
102     simpa [PowerSeries.constantCoeff] using heq
103   rw [← hψ]
104   dsimp only
105   intro v
106   change ψ (retainedToCompletedPowerSeries W v) = residue V v
107   change (completedResidue W.coefficientField V)
108     (W.completedPowerSeriesEquiv
109       (W.completedPowerSeriesEquiv.symm
110         (algebraMap V (AdicCompletion (maximalIdeal V) V) v))) = residue V v
111   rw [W.completedPowerSeriesEquiv.apply_symm_apply]
112   change adicJetResidue W.coefficientField V 0
113     (Ideal.Quotient.mk ((maximalIdeal V) ^ 1) v) = residue V v
114   simp [adicJetResidue]
115 
116 /-- Residue coordinates of a finite completed projective column yield dual
117 derivations of the full residue field when that field is algebraic over the
118 subfield they generate. -/
119 theorem exists_visible_derivation_frame_of_residue_coordinates
120     {ι : Type v} [Fintype ι] (qbar : ι → κ)
121     (halg : Algebra.IsAlgebraic
122       (IntermediateField.adjoin k (Set.range qbar) : IntermediateField k κ)
123       κ) :
124     ∃ (rows : Fin (Module.finrank κ (Ω[κ⁄k])) ↪ ι)
125       (D : Fin (Module.finrank κ (Ω[κ⁄k])) → Derivation k κ κ),
126       ∀ i j, D j (qbar (rows i)) = if i = j then 1 else 0 := by
127   let E : IntermediateField k κ := IntermediateField.adjoin k (Set.range qbar)
128   letI : Algebra E κ := E.toSubalgebra.toAlgebra
129   letI : IsScalarTower k E κ :=
130     IsScalarTower.of_algebraMap_eq fun _ => rfl
131   letI : Algebra.IsAlgebraic E κ := halg
132   letI : Algebra.IsSeparable E κ := inferInstance
133   let qE : ι → E := fun i =>
134     ⟨qbar i, IntermediateField.subset_adjoin k (Set.range qbar) ⟨i, rfl⟩⟩
135   have hgen : IntermediateField.adjoin k (Set.range qE) = ⊤ := by
136     apply top_unique
137     intro x _
138     let T : IntermediateField k E := IntermediateField.adjoin k (Set.range qE)
139     have hx : (x : κ) ∈ IntermediateField.adjoin k (Set.range qbar) := x.property
140     have hT (y : κ) (hy : y ∈ IntermediateField.adjoin k (Set.range qbar)) :
141         (⟨y, hy⟩ : E) ∈ T := by
142       apply IntermediateField.adjoin_induction k
143         (p := fun z hz => (⟨z, hz⟩ : E) ∈ T)
144       · intro z hz
145         change z ∈ Set.range qbar at hz
146         obtain ⟨i, rfl⟩ := hz
147         exact IntermediateField.subset_adjoin k (Set.range qE) ⟨i, rfl⟩
148       · intro a
149         exact T.algebraMap_mem a
150       · intro a b _ _ ha hb
151         exact T.add_mem ha hb
152       · intro a _ ha
153         exact T.inv_mem ha
154       · intro a b _ _ ha hb
155         exact T.mul_mem ha hb
156     exact hT (x : κ) hx
157   obtain ⟨rows, D, hD⟩ :=
158     exists_visible_derivation_frame_of_finite_separable_adjoin
159       (k := k) (E := E) (K := κ) qE hgen
160   refine ⟨rows, D, ?_⟩
161   intro i j
162   simpa [qE] using hD i j
163 
164 /-- The coefficientwise derivation columns of a completed projective arc
165 have a selected residue minor equal to one. -/
166 theorem exists_coefficientwise_residue_minor_eq_one
167     {ι : Type v} [Fintype ι]
168     (q : ι → PowerSeries κ)
169     (halg : Algebra.IsAlgebraic
170       (IntermediateField.adjoin k
171         (Set.range fun i => PowerSeries.constantCoeff (q i)) :
172           IntermediateField k κ)
173       κ) :
174     ∃ (rows : Fin (Module.finrank κ (Ω[κ⁄k])) ↪ ι)
175       (D : Fin (Module.finrank κ (Ω[κ⁄k])) → Derivation k κ κ),
176       (∀ i j, D j (PowerSeries.constantCoeff (q (rows i))) =
177         if i = j then 1 else 0) ∧
178       PowerSeries.constantCoeff
179         (selectedMinor (coefficientwiseTangentMatrix q D) rows).det = 1 := by
180   obtain ⟨rows, D, hD⟩ :=
181     exists_visible_derivation_frame_of_residue_coordinates
182       (k := k) (κ := κ) (fun i => PowerSeries.constantCoeff (q i)) halg
183   refine ⟨rows, D, hD, ?_⟩
184   rw [constantCoeff_selectedMinor_det]
185   have hmatrix :
186       selectedMinor
187           (residueMatrix (coefficientwiseTangentMatrix q D)) rows =
188         (1 : Matrix (Fin (Module.finrank κ (Ω[κ⁄k])))
189           (Fin (Module.finrank κ (Ω[κ⁄k]))) κ) := by
190     ext i j
191     simpa [selectedMinor, residueMatrix, Matrix.one_apply,
192       constantCoeff_coefficientwiseTangentMatrix] using hD i j
193   rw [hmatrix, Matrix.det_one]
194 
195 /-- Applying the residue-coordinate frame to the actual retained completion
196 preserves the selected coefficientwise minor.  The hypotheses are the
197 residue-generation data supplied by the retained divisorial construction. -/
198 theorem exists_retained_coefficientwise_residue_minor_eq_one
199     {K : Type u} [Field K] [Algebra k K] {x : K}
200     (W : Data k K x) :
201     letI : Algebra (CoordinateZeroLocalRing W.coefficientField) K :=
202       W.ambientAlgebra
203     let V := W.place.valuation.toSubring
204     letI : IsDiscreteValuationRing V := W.place.isDiscrete
205     letI : Algebra W.coefficientField V :=
206       (relativeCoefficientMap W.coefficientField W.place).toAlgebra
207     let κ := ResidueField V
208     letI : Algebra k κ :=
209       (((residue V).comp (relativeCoefficientMap W.coefficientField W.place)).comp
210         (algebraMap k W.coefficientField)).toAlgebra
211     ∀ {ι : Type v} [Fintype ι] (q : ι → V),
212       Algebra.IsAlgebraic
213         (IntermediateField.adjoin k
214           (Set.range fun i => residue V (q i)) : IntermediateField k κ) κ →
215       ∃ (rows : Fin (Module.finrank κ (Ω[κ⁄k])) ↪ ι)
216         (D : Fin (Module.finrank κ (Ω[κ⁄k])) → Derivation k κ κ),
217         (∀ i j, D j (residue V (q (rows i))) = if i = j then 1 else 0) ∧
218         PowerSeries.constantCoeff
219           (selectedMinor
220             (coefficientwiseTangentMatrix
221               (fun i => retainedToCompletedPowerSeries W (q i)) D) rows).det = 1 := by
222   letI : Algebra (CoordinateZeroLocalRing W.coefficientField) K :=
223     W.ambientAlgebra
224   let V := W.place.valuation.toSubring
225   letI : IsDiscreteValuationRing V := W.place.isDiscrete
226   letI : Algebra W.coefficientField V :=
227     (relativeCoefficientMap W.coefficientField W.place).toAlgebra
228   let κ := ResidueField V
229   letI : Algebra k κ :=
230     (((residue V).comp (relativeCoefficientMap W.coefficientField W.place)).comp
231       (algebraMap k W.coefficientField)).toAlgebra
232   dsimp only
233   intro ι _ q halg
234   let qhat : ι → PowerSeries κ :=
235     fun i => retainedToCompletedPowerSeries W (q i)
236   have hcoeff (i : ι) :
237       PowerSeries.constantCoeff (qhat i) = residue V (q i) := by
238     exact constantCoeff_retainedToCompleted_eq_residue W (q i)
239   have hrange :
240       Set.range (fun i => PowerSeries.constantCoeff (qhat i)) =
241         Set.range (fun i => residue V (q i)) := by
242     congr 1
243     funext i
244     exact hcoeff i
245   have hgenerated :
246       Algebra.IsAlgebraic
247         (IntermediateField.adjoin k
248           (Set.range fun i => PowerSeries.constantCoeff (qhat i)) :
249             IntermediateField k κ) κ := by
250     rw [hrange]
251     exact halg
252   obtain ⟨rows, D, hD, hminor⟩ :=
253     exists_coefficientwise_residue_minor_eq_one
254       (k := k) (κ := κ) qhat hgenerated
255   refine ⟨rows, D, ?_, hminor⟩
256   intro i j
257   rw [← hcoeff (rows i)]
258   exact hD i j
259 
260 #print axioms exists_visible_derivation_frame_of_residue_coordinates
261 #print axioms exists_coefficientwise_residue_minor_eq_one
262 #print axioms constantCoeff_retainedToCompleted_eq_residue
263 #print axioms exists_retained_coefficientwise_residue_minor_eq_one
264 
265 end
266 
267 end Stafford38.Geometry.PaperResidueDerivationFrame
268