Stafford38/Geometry/ActualOptionArcDerivative.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Geometry.PrescribedCompletionDerivationCommutation
3 
4 @[expose] public section
5 
6 set_option autoImplicit false
7 set_option maxHeartbeats 4000000
8 set_option linter.style.haveILetI false
9 
10 /-!
11 # The tilted-arc derivative in the actual Option-indexed local chart
12 
13 The prescribed projective chart is indexed by `Option (Fin d)`.  This file
14 expresses the derivative of its canonical tilted arc directly in those
15 coordinate derivations, using the already checked Kähler-basis decomposition
16 of derivations.
17 -/
18 
19 namespace Stafford38.Geometry.ActualOptionArcDerivative
20 
21 open Stafford38.Geometry.EtaleLocalChartFinitePartialDerivation
22 open Stafford38.Geometry.EtaleCotangentBasis
23 open Stafford38.Geometry.PrescribedGroundPointPowerSeriesMap
24 open Stafford38.Geometry.PrescribedGroundPointUnitPowerChart
25 open Stafford38.Geometry.SmoothLocalTiltedArcAxisLift
26 open Stafford38.Geometry.PrescribedCompletionDerivationCommutation
27 open Stafford38.Geometry.PrescribedAffineResidueCompletion
28 
29 noncomputable section
30 
31 universe u v
32 
33 variable {k : Type u} [Field k] {d : ℕ} {A : Type v} [CommRing A]
34 variable [Algebra (MvPolynomial (Option (Fin d)) k) A] [Algebra k A]
35   [IsScalarTower k (MvPolynomial (Option (Fin d)) k) A]
36   [Algebra.EssFiniteType (MvPolynomial (Option (Fin d)) k) A]
37 
38 local notation "ChartBase" => MvPolynomial (Option (Fin d)) k
39 
40 /-- Any one-variable power-series arc whose values on the Option-chart
41 parameters have the indicated first-order coefficients differentiates by the
42 corresponding weighted sum of the canonical coordinate derivations. -/
43 theorem arc_derivative_eq_option_coordinate_sum
44     {T : Type*} [CommRing T] [Algebra ChartBase T] [Algebra k T]
45     [IsScalarTower k ChartBase T] [Algebra.FormallyEtale ChartBase T]
46     (φ : T →ₐ[k] PowerSeries k) (α : Fin d → k)
47     (β : Option (Fin d) → k)
48     (hcoord : ∀ j : Option (Fin d),
49       φ (algebraMap ChartBase T (MvPolynomial.X j)) =
50         PowerSeries.C (β j) +
51           PowerSeries.C (j.elim 1 α) * PowerSeries.X)
52     (b : T) :
53     PowerSeries.derivative (R := k) (φ b) =
54       φ (EtaleCotangentBasis.coordinateDerivation
55         (k := k) (σ := Option (Fin d)) (B := T) (L := T) none b) +
56         ∑ j : Fin d, PowerSeries.C (α j) *
57           φ (EtaleCotangentBasis.coordinateDerivation
58             (k := k) (σ := Option (Fin d)) (B := T) (L := T) (some j) b) := by
59   letI : Algebra T (PowerSeries k) := φ.toRingHom.toAlgebra
60   letI : IsScalarTower k T (PowerSeries k) :=
61     IsScalarTower.of_algebraMap_eq (fun c => by
62       change algebraMap k (PowerSeries k) c = φ (algebraMap k T c)
63       exact (φ.commutes c).symm)
64   let φlin : T →ₗ[T] PowerSeries k :=
65     { toFun := φ
66       map_add' := φ.map_add
67       map_smul' := fun r x => by
68         change φ (r * x) = φ r * φ x
69         exact φ.map_mul r x }
70   let Dleft : Derivation k T (PowerSeries k) :=
71     (PowerSeries.derivative (R := k)).compAlgebraMap T
72   let Dright : Derivation k T (PowerSeries k) :=
73     (φlin.compDer (EtaleCotangentBasis.coordinateDerivation
74       (k := k) (σ := Option (Fin d)) (B := T) (L := T) none)) +
75       ∑ j : Fin d, PowerSeries.C (α j) •
76         (φlin.compDer (EtaleCotangentBasis.coordinateDerivation
77           (k := k) (σ := Option (Fin d)) (B := T) (L := T) (some j)))
78   have hleft (j : Option (Fin d)) :
79       Dleft (algebraMap ChartBase T (MvPolynomial.X j)) = PowerSeries.C (j.elim 1 α) := by
80     change PowerSeries.derivative (R := k)
81       (φ (algebraMap ChartBase T (MvPolynomial.X j))) = _
82     rw [hcoord j]
83     cases j <;> simp [Derivation.map_add, Derivation.leibniz]
84   have hright (j : Option (Fin d)) :
85       Dright (algebraMap ChartBase T (MvPolynomial.X j)) = PowerSeries.C (j.elim 1 α) := by
86     change (Derivation.coeFnAddMonoidHom
87       ((φlin.compDer (EtaleCotangentBasis.coordinateDerivation
88         (k := k) (σ := Option (Fin d)) (B := T) (L := T) none)) +
89         ∑ i : Fin d, PowerSeries.C (α i) •
90           (φlin.compDer (EtaleCotangentBasis.coordinateDerivation
91             (k := k) (σ := Option (Fin d)) (B := T) (L := T) (some i)))))
92       (algebraMap ChartBase T (MvPolynomial.X j)) = _
93     rw [map_add, map_sum]
94     cases j with
95     | none => simp [φlin,
96         EtaleCotangentBasis.coordinateDerivation_apply_parameter]
97     | some j => simp [φlin, eq_comm,
98         EtaleCotangentBasis.coordinateDerivation_apply_parameter]
99   have hderiv : Dleft = Dright := by
100     calc
101       Dleft = EtaleCotangentBasis.derivationFromValues
102           (k := k) (σ := Option (Fin d)) (B := T) (L := PowerSeries k)
103           (fun j => Dleft (algebraMap ChartBase T (MvPolynomial.X j))) :=
104         (EtaleCotangentBasis.derivation_eq_from_parameter_values Dleft).symm
105       _ = EtaleCotangentBasis.derivationFromValues
106           (k := k) (σ := Option (Fin d)) (B := T) (L := PowerSeries k)
107           (fun j => Dright (algebraMap ChartBase T (MvPolynomial.X j))) := by
108         congr 1
109         funext j
110         rw [hleft j, hright j]
111       _ = Dright := EtaleCotangentBasis.derivation_eq_from_parameter_values Dright
112   calc
113     PowerSeries.derivative (R := k) (φ b) = Dleft b := rfl
114     _ = Dright b := congrArg (fun D : Derivation k T (PowerSeries k) => D b) hderiv
115     _ = φ (EtaleCotangentBasis.coordinateDerivation
116           (k := k) (σ := Option (Fin d)) (B := T) (L := T) none b) +
117         ∑ j : Fin d, PowerSeries.C (α j) *
118           φ (EtaleCotangentBasis.coordinateDerivation
119             (k := k) (σ := Option (Fin d)) (B := T) (L := T) (some j) b) := by
120       change (Derivation.coeFnAddMonoidHom
121         ((φlin.compDer (EtaleCotangentBasis.coordinateDerivation
122           (k := k) (σ := Option (Fin d)) (B := T) (L := T) none)) +
123           ∑ j : Fin d, PowerSeries.C (α j) •
124             (φlin.compDer (EtaleCotangentBasis.coordinateDerivation
125               (k := k) (σ := Option (Fin d)) (B := T) (L := T) (some j)))) b) = _
126       rw [map_add, map_sum]
127       simp [φlin]
128 
129 /-- The actual prescribed completion, reindexed by `Fin.succEquiv`, and
130 restricted along the canonical tilted arc obeys the Option-coordinate
131 derivative formula. -/
132 theorem localToFinSuccArc_derivative_eq_option_coordinate_sum
133     (M : Ideal A) [M.IsMaximal] (eM : (A ⧸ M) ≃ₐ[k] k)
134     [Algebra.FormallyEtale ChartBase (Localization.AtPrime M)]
135     (α : Fin d → k) (b : Localization.AtPrime M) :
136     PowerSeries.derivative (R := k)
137       (tiltedArc (k := k) α
138         (localToFinSuccPowerSeries (k := k) (B := A) (d := d) M eM b)) =
139       tiltedArc (k := k) α
140         (localToFinSuccPowerSeries (k := k) (B := A) (d := d) M eM
141           (EtaleCotangentBasis.coordinateDerivation
142             (k := k) (σ := Option (Fin d)) (B := Localization.AtPrime M)
143             (L := Localization.AtPrime M) none b)) +
144         ∑ j : Fin d, PowerSeries.C (α j) *
145           tiltedArc (k := k) α
146             (localToFinSuccPowerSeries (k := k) (B := A) (d := d) M eM
147               (EtaleCotangentBasis.coordinateDerivation
148                 (k := k) (σ := Option (Fin d)) (B := Localization.AtPrime M)
149                 (L := Localization.AtPrime M) (some j) b)) := by
150   let T := Localization.AtPrime M
151   let Φ := localToFinSuccPowerSeries (k := k) (B := A) (d := d) M eM
152   let φ : T →ₐ[k] PowerSeries k :=
153     { toRingHom := (tiltedArcMap (k := k) α).comp Φ.toRingHom
154       commutes' := by
155         intro c
156         calc
157           (tiltedArcMap (k := k) α).comp Φ.toRingHom (algebraMap k T c) =
158               tiltedArcMap (k := k) α (MvPowerSeries.C c) := by
159             change tiltedArcMap (k := k) α (Φ (algebraMap k T c)) = _
160             rw [Φ.commutes c]
161             rfl
162           _ = algebraMap k (PowerSeries k) c := by
163             change tiltedArc (k := k) α (MvPowerSeries.C c) = PowerSeries.C c
164             exact Stafford38.Geometry.SmoothLocalTiltedArcAxisLift.tiltedArc_C α c }
165   have hcoord (j : Option (Fin d)) :
166       φ (algebraMap ChartBase T (MvPolynomial.X j)) =
167         PowerSeries.C (residueCoordinates (σ := Option (Fin d)) M eM j) +
168           PowerSeries.C (j.elim 1 α) * PowerSeries.X := by
169     cases j with
170     | none =>
171         change tiltedArc (k := k) α
172           (Φ (algebraMap ChartBase T (MvPolynomial.X none))) = _
173         have hmap : algebraMap ChartBase T (MvPolynomial.X none) =
174             algebraMap A T (algebraMap ChartBase A (MvPolynomial.X none)) :=
175           IsScalarTower.algebraMap_apply ChartBase A T _
176         rw [hmap, localToFinSuccPowerSeries_none (k := k) (B := A) M eM]
177         change tiltedArc (k := k) α
178           (MvPowerSeries.C (residueCoordinates (σ := Option (Fin d)) M eM none) +
179             MvPowerSeries.X (0 : Fin (d + 1))) = _
180         calc
181           tiltedArc (k := k) α
182               (MvPowerSeries.C (residueCoordinates (σ := Option (Fin d)) M eM none) +
183                 MvPowerSeries.X (0 : Fin (d + 1))) =
184               tiltedArc (k := k) α
185                   (MvPowerSeries.C (residueCoordinates (σ := Option (Fin d)) M eM none)) +
186                 tiltedArc (k := k) α (MvPowerSeries.X (0 : Fin (d + 1))) := by
187               exact map_add (tiltedArcMap (k := k) α) _ _
188           _ = PowerSeries.C (residueCoordinates (σ := Option (Fin d)) M eM none) +
189               PowerSeries.C (none.elim 1 α) * PowerSeries.X := by
190               rw [Stafford38.Geometry.SmoothLocalTiltedArcAxisLift.tiltedArc_C,
191                 Stafford38.Geometry.SmoothLocalTiltedArcAxisLift.tiltedArc_X_t]
192               simp
193     | some j =>
194         change tiltedArc (k := k) α
195           (Φ (algebraMap ChartBase T (MvPolynomial.X (some j)))) = _
196         have hmap : algebraMap ChartBase T (MvPolynomial.X (some j)) =
197             algebraMap A T (algebraMap ChartBase A (MvPolynomial.X (some j))) :=
198           IsScalarTower.algebraMap_apply ChartBase A T _
199         rw [hmap, localToFinSuccPowerSeries_some (k := k) (B := A) M eM j]
200         change tiltedArc (k := k) α
201           (MvPowerSeries.C (residueCoordinates (σ := Option (Fin d)) M eM (some j)) +
202             MvPowerSeries.X j.succ) = _
203         calc
204           tiltedArc (k := k) α
205               (MvPowerSeries.C (residueCoordinates (σ := Option (Fin d)) M eM (some j)) +
206                 MvPowerSeries.X j.succ) =
207               tiltedArc (k := k) α
208                   (MvPowerSeries.C (residueCoordinates (σ := Option (Fin d)) M eM (some j))) +
209                 tiltedArc (k := k) α (MvPowerSeries.X j.succ) := by
210               exact map_add (tiltedArcMap (k := k) α) _ _
211           _ = PowerSeries.C (residueCoordinates (σ := Option (Fin d)) M eM (some j)) +
212               PowerSeries.C ((some j).elim 1 α) * PowerSeries.X := by
213               rw [Stafford38.Geometry.SmoothLocalTiltedArcAxisLift.tiltedArc_C,
214                 Stafford38.Geometry.SmoothLocalTiltedArcAxisLift.tiltedArc_X_succ]
215               rfl
216   have h := arc_derivative_eq_option_coordinate_sum
217     (k := k) (d := d) (T := T) φ α
218     (β := residueCoordinates (σ := Option (Fin d)) M eM) hcoord b
219   simpa [φ, Φ, tiltedArc] using h
220 
221 end
222 end Stafford38.Geometry.ActualOptionArcDerivative
223