Stafford38/Geometry/ContinuousPowerSeriesTangentFrame.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Mathlib.RingTheory.PowerSeries.Derivative
3 public import Mathlib.RingTheory.PowerSeries.PiTopology
4 public import Stafford38.Geometry.FixedWitnessTangentSqueeze
5 public import Stafford38.Geometry.SeparableResidueDerivationExtension
6 
7 @[expose] public section
8 
9 /-!
10 # Continuous derivation frames on a supplied power-series chart
11 
12 Assume a completed boundary DVR has already been identified with `K[[t]]`.
13 This file constructs the continuous uniformizer derivation and coefficientwise
14 extensions of `k`-derivations of `K`; their constant coefficients give affine
15 tangent vectors for `FixedWitnessTangentSqueeze`.
16 
17 The paper-facing same-witness route proves equation tangency and the Laurent
18 tangent-rank bound in `PaperLaurentArcTangency` and
19 `PaperSameWitnessTangentDimension`. This generic module is not a chart
20 producer. Smooth closed-point completion and arc specialization remain
21 separate correspondence questions in `docs/paper-route-alignment.json`.
22 -/
23 
24 namespace Stafford38.Geometry.ContinuousPowerSeriesTangentFrame
25 
26 open Stafford38.Geometry.AffineConormalSpan
27 open Stafford38.Geometry.FixedWitnessTangentSqueeze
28 open Stafford38.Geometry.SeparableResidueDerivationExtension
29 
30 open scoped PowerSeries.WithPiTopology
31 
32 noncomputable section
33 
34 universe u v
35 
36 variable {k K : Type u} [Field k] [Field K] [Algebra k K]
37 
38 /-- The first coefficient of a power-series-valued family.  This is the
39 canonical coefficient description of the tangent vector supplied by the
40 uniformizer derivation. -/
41 def powerSeriesFirstCoefficient {R : Type*} [CommSemiring R]
42     {ι : Type*} (q : ι → PowerSeries R) : ι → R :=
43   fun i ↦ PowerSeries.coeff 1 (q i)
44 
45 @[simp] theorem powerSeriesFirstCoefficient_eq_constantCoeff_derivative
46     {R : Type*} [CommSemiring R] {ι : Type*} (q : ι → PowerSeries R) :
47     powerSeriesFirstCoefficient q =
48       fun i ↦ PowerSeries.constantCoeff (PowerSeries.derivative (R := R) (q i)) := by
49   funext i
50   rw [powerSeriesFirstCoefficient, ← PowerSeries.coeff_zero_eq_constantCoeff,
51     PowerSeries.coeff_derivative]
52   simp
53 
54 /-- The `k`-linear coefficientwise action underlying the extended
55 derivation. -/
56 noncomputable def coefficientwiseLinearMap (D : Derivation k K K) :
57     PowerSeries K →ₗ[k] PowerSeries K where
58   toFun f := PowerSeries.mk fun n ↦ D (PowerSeries.coeff n f)
59   map_add' f g := by
60     ext n
61     simp
62   map_smul' a f := by
63     ext n
64     simp
65 
66 @[simp]
67 theorem coeff_coefficientwiseLinearMap (D : Derivation k K K)
68     (f : PowerSeries K) (n : ℕ) :
69     PowerSeries.coeff n (coefficientwiseLinearMap D f) =
70       D (PowerSeries.coeff n f) := by
71   change PowerSeries.coeff n
72       (PowerSeries.mk fun m ↦ D (PowerSeries.coeff m f)) = _
73   rw [PowerSeries.coeff_mk]
74 
75 /-- Apply a derivation to every coefficient of a formal power series. -/
76 noncomputable def coefficientwiseDerivation (D : Derivation k K K) :
77     Derivation k (PowerSeries K) (PowerSeries K) where
78   toLinearMap := coefficientwiseLinearMap D
79   map_one_eq_zero' := by
80     ext n
81     by_cases hn : n = 0 <;>
82       simp [hn, D.map_one_eq_zero]
83   leibniz' f g := by
84     ext n
85     simp only [smul_eq_mul, coeff_coefficientwiseLinearMap]
86     rw [PowerSeries.coeff_mul, map_add,
87       PowerSeries.coeff_mul, PowerSeries.coeff_mul]
88     rw [map_sum]
89     simp_rw [D.leibniz]
90     rw [Finset.sum_add_distrib]
91     simp only [coeff_coefficientwiseLinearMap, smul_eq_mul]
92     congr 1
93     simpa only [Prod.fst_swap, Prod.snd_swap] using
94       (Finset.Nat.sum_antidiagonal_swap (n := n)
95         (f := fun p ↦ PowerSeries.coeff p.1 g *
96           D (PowerSeries.coeff p.2 f)))
97 
98 @[simp]
99 theorem coeff_coefficientwiseDerivation (D : Derivation k K K)
100     (f : PowerSeries K) (n : ℕ) :
101     PowerSeries.coeff n (coefficientwiseDerivation D f) =
102       D (PowerSeries.coeff n f) := by
103   exact coeff_coefficientwiseLinearMap D f n
104 
105 @[simp]
106 theorem coefficientwiseDerivation_C (D : Derivation k K K) (a : K) :
107     coefficientwiseDerivation D (PowerSeries.C a) =
108       PowerSeries.C (D a) := by
109   ext n
110   cases n <;> simp
111 
112 @[simp]
113 theorem coefficientwiseDerivation_X (D : Derivation k K K) :
114     coefficientwiseDerivation D (PowerSeries.X : PowerSeries K) = 0 := by
115   ext n
116   by_cases hn : n = 1 <;>
117     simp [PowerSeries.coeff_X, hn, D.map_one_eq_zero]
118 
119 /-- Coefficientwise derivations are continuous for the coefficientwise
120 topology when the coefficient field is discrete. -/
121 theorem continuous_coefficientwiseDerivation
122     [TopologicalSpace K] [DiscreteTopology K]
123     (D : Derivation k K K) :
124     Continuous (coefficientwiseDerivation D) := by
125   refine continuous_pi_iff.mpr fun d ↦ ?_
126   exact (continuous_of_discreteTopology : Continuous D).comp
127     (PowerSeries.WithPiTopology.continuous_coeff K (d ()))
128 
129 /-- The uniformizer derivation, regarded as a `k`-derivation by restriction
130 along `k → K → K[[t]]`. -/
131 noncomputable def uniformizerDerivation :
132     Derivation k (PowerSeries K) (PowerSeries K) :=
133   (PowerSeries.derivative (R := K)).restrictScalars k
134 
135 @[simp]
136 theorem uniformizerDerivation_C (a : K) :
137     uniformizerDerivation (k := k) (K := K) (PowerSeries.C a) = 0 := by
138   simp [uniformizerDerivation]
139 
140 @[simp]
141 theorem uniformizerDerivation_X :
142     uniformizerDerivation (k := k) (K := K)
143       (PowerSeries.X : PowerSeries K) = 1 := by
144   simp [uniformizerDerivation]
145 
146 theorem coeff_uniformizerDerivation (f : PowerSeries K) (n : ℕ) :
147     PowerSeries.coeff n
148         (uniformizerDerivation (k := k) (K := K) f) =
149       PowerSeries.coeff (n + 1) f * (n + 1) := by
150   exact PowerSeries.coeff_derivative f n
151 
152 /-- Formal differentiation is continuous in the coefficientwise topology. -/
153 theorem continuous_uniformizerDerivation
154     [TopologicalSpace K] [DiscreteTopology K] :
155     Continuous (uniformizerDerivation (k := k) (K := K)) := by
156   refine continuous_pi_iff.mpr fun d ↦ ?_
157   obtain ⟨n, rfl⟩ : ∃ n, d = Finsupp.single () n :=
158     ⟨d default, Finsupp.unique_single d⟩
159   show Continuous fun a : PowerSeries K ↦
160     PowerSeries.coeff n (uniformizerDerivation (k := k) (K := K) a)
161   rw [funext fun f ↦ coeff_uniformizerDerivation (k := k) (K := K) f n]
162   exact (continuous_of_discreteTopology :
163       Continuous (fun a : K ↦ a * (n + 1))).comp
164     (PowerSeries.WithPiTopology.continuous_coeff K (n + 1))
165 
166 /-- Index type for the uniformizer direction together with a finite family of
167 coefficient directions. -/
168 abbrev FrameIndex (κ : Type v) := Option κ
169 
170 /-- The derivation frame on `K[[t]]`: `none` is `d/dt`, while `some j` acts
171 coefficientwise by `D j`. -/
172 noncomputable def powerSeriesDerivationFrame {κ : Type v}
173     (D : κ → Derivation k K K) :
174     FrameIndex κ → Derivation k (PowerSeries K) (PowerSeries K)
175   | none => uniformizerDerivation
176   | some j => coefficientwiseDerivation (D j)
177 
178 /-- Every member of the finite chart frame is continuous. -/
179 theorem continuous_powerSeriesDerivationFrame
180     [TopologicalSpace K] [DiscreteTopology K]
181     {κ : Type v} (D : κ → Derivation k K K) (j : FrameIndex κ) :
182     Continuous (powerSeriesDerivationFrame D j) := by
183   cases j with
184   | none => exact continuous_uniformizerDerivation
185   | some j => exact continuous_coefficientwiseDerivation (D j)
186 
187 /-- Evaluate a chart derivation on each affine coordinate and specialize at
188 the closed point. -/
189 def residueFrameVector {n : ℕ} {κ : Type v}
190     (q : Fin n → PowerSeries K) (D : κ → Derivation k K K)
191     (j : FrameIndex κ) : AffineTangentVector K n :=
192   fun i ↦ PowerSeries.constantCoeff (powerSeriesDerivationFrame D j (q i))
193 
194 @[simp]
195 theorem residueFrameVector_uniformizer {n : ℕ} {κ : Type v}
196     (q : Fin n → PowerSeries K) (D : κ → Derivation k K K) (i : Fin n) :
197     residueFrameVector q D none i = PowerSeries.coeff 1 (q i) := by
198   rw [residueFrameVector, powerSeriesDerivationFrame,
199     ← PowerSeries.coeff_zero_eq_constantCoeff]
200   simpa using coeff_uniformizerDerivation (k := k) (K := K) (q i) 0
201 
202 @[simp]
203 theorem residueFrameVector_coefficient {n : ℕ} {κ : Type v}
204     (q : Fin n → PowerSeries K) (D : κ → Derivation k K K)
205     (j : κ) (i : Fin n) :
206     residueFrameVector q D (some j) i =
207       D j (PowerSeries.constantCoeff (q i)) := by
208   rw [residueFrameVector, powerSeriesDerivationFrame,
209     ← PowerSeries.coeff_zero_eq_constantCoeff]
210   exact coeff_coefficientwiseDerivation (D j) (q i) 0
211 
212 /-- Exact finite-dimensional handoff to `FixedWitnessTangentSqueeze`.
213 
214 The three hypotheses are precisely the geometric obligations left to the
215 supplied completed-DVR chart: tangency of every specialized derivation,
216 independence of the resulting residue vectors, and the tangent-dimension
217 bound. -/
218 theorem tangent_eq_span_residueFrame
219     {n : ℕ} {κ : Type v} [Fintype κ]
220     (I : Ideal (MvPolynomial (Fin n) K))
221     (q : Fin n → PowerSeries K)
222     (D : κ → Derivation k K K)
223     (hb : ∀ j, residueFrameVector q D j ∈
224       zariskiTangentSpace
225         (fun i ↦ PowerSeries.constantCoeff (q i)) I)
226     (hindependent : LinearIndependent K (residueFrameVector q D))
227     (hfinrank : Module.finrank K
228         (zariskiTangentSpace
229           (fun i ↦ PowerSeries.constantCoeff (q i)) I) ≤
230       Fintype.card (FrameIndex κ)) :
231     zariskiTangentSpace
232         (fun i ↦ PowerSeries.constantCoeff (q i)) I =
233       Submodule.span K (Set.range (residueFrameVector q D)) := by
234   exact fixedWitnessTangentSqueeze I _ _ hb hindependent hfinrank
235 
236 /-- Reverse-inclusion form used by the conormal annihilator consumer. -/
237 theorem tangent_le_span_residueFrame
238     {n : ℕ} {κ : Type v} [Fintype κ]
239     (I : Ideal (MvPolynomial (Fin n) K))
240     (q : Fin n → PowerSeries K)
241     (D : κ → Derivation k K K)
242     (hb : ∀ j, residueFrameVector q D j ∈
243       zariskiTangentSpace
244         (fun i ↦ PowerSeries.constantCoeff (q i)) I)
245     (hindependent : LinearIndependent K (residueFrameVector q D))
246     (hfinrank : Module.finrank K
247         (zariskiTangentSpace
248           (fun i ↦ PowerSeries.constantCoeff (q i)) I) ≤
249       Fintype.card (FrameIndex κ)) :
250     zariskiTangentSpace
251         (fun i ↦ PowerSeries.constantCoeff (q i)) I ≤
252       Submodule.span K (Set.range (residueFrameVector q D)) := by
253   rw [tangent_eq_span_residueFrame I q D hb hindependent hfinrank]
254 
255 /-- Extend a finite family of coefficient-field derivations through a
256 separable residue extension and then coefficientwise to the supplied
257 `K[[t]]` chart. -/
258 noncomputable def separablePowerSeriesDerivationFrame
259     {E : Type u} [Field E] [Algebra k E] [Algebra E K]
260     [IsScalarTower k E K] [Algebra.IsSeparable E K]
261     {κ : Type v} (D : κ → Derivation k E E) :
262     FrameIndex κ → Derivation k (PowerSeries K) (PowerSeries K) :=
263   powerSeriesDerivationFrame
264     (fun j ↦ extendCoefficientDerivation k E K (D j))
265 
266 @[simp]
267 theorem separablePowerSeriesDerivationFrame_none
268     {E : Type u} [Field E] [Algebra k E] [Algebra E K]
269     [IsScalarTower k E K] [Algebra.IsSeparable E K]
270     {κ : Type v} (D : κ → Derivation k E E) :
271     separablePowerSeriesDerivationFrame (K := K) D none =
272       uniformizerDerivation := by
273   rfl
274 
275 @[simp]
276 theorem separablePowerSeriesDerivationFrame_some_C
277     {E : Type u} [Field E] [Algebra k E] [Algebra E K]
278     [IsScalarTower k E K] [Algebra.IsSeparable E K]
279     {κ : Type v} (D : κ → Derivation k E E) (j : κ) (a : E) :
280     separablePowerSeriesDerivationFrame (K := K) D (some j)
281         (PowerSeries.C (algebraMap E K a)) =
282       PowerSeries.C (algebraMap E K (D j a)) := by
283   rw [separablePowerSeriesDerivationFrame, powerSeriesDerivationFrame,
284     coefficientwiseDerivation_C]
285   congr 1
286   exact Derivation.congr_fun
287     (extendCoefficientDerivation_compAlgebraMap k E K (D j)) a
288 
289 /-- Continuity of the complete frame obtained from the separable residue
290 tower. -/
291 theorem continuous_separablePowerSeriesDerivationFrame
292     [TopologicalSpace K] [DiscreteTopology K]
293     {E : Type u} [Field E] [Algebra k E] [Algebra E K]
294     [IsScalarTower k E K] [Algebra.IsSeparable E K]
295     {κ : Type v} (D : κ → Derivation k E E) (j : FrameIndex κ) :
296     Continuous (separablePowerSeriesDerivationFrame (K := K) D j) := by
297   exact continuous_powerSeriesDerivationFrame _ j
298 
299 #print axioms coefficientwiseLinearMap
300 #print axioms coefficientwiseDerivation
301 #print axioms coeff_coefficientwiseDerivation
302 #print axioms continuous_coefficientwiseDerivation
303 #print axioms uniformizerDerivation
304 #print axioms continuous_uniformizerDerivation
305 #print axioms powerSeriesDerivationFrame
306 #print axioms continuous_powerSeriesDerivationFrame
307 #print axioms residueFrameVector
308 #print axioms tangent_eq_span_residueFrame
309 #print axioms tangent_le_span_residueFrame
310 #print axioms separablePowerSeriesDerivationFrame
311 #print axioms separablePowerSeriesDerivationFrame_some_C
312 #print axioms continuous_separablePowerSeriesDerivationFrame
313 
314 end
315 
316 end Stafford38.Geometry.ContinuousPowerSeriesTangentFrame
317