Stafford38/Geometry/ActualOptionColumnBinding.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Geometry.ActualSmoothOpenChartNumerator
3 public import Stafford38.Geometry.SelectedResidueNormalizationLocalization
4 public import Mathlib.RingTheory.MvPolynomial
5 
6 @[expose] public section
7 
8 set_option autoImplicit false
9 set_option maxHeartbeats 4000000
10 set_option synthInstance.maxHeartbeats 400000
11 
12 noncomputable section
13 
14 namespace Stafford38.Geometry.ActualOptionColumnBinding
15 
16 open Stafford38.Geometry.AsymptoticChartArcAdapter
17 open Stafford38.Geometry.AsymptoticDivisorExistence
18 open Stafford38.Geometry.ChartGenericPointFractionRing
19 open Stafford38.Geometry.ComponentProjectiveClosure
20 open Stafford38.Geometry.ComponentProjectiveChartKernel
21 open Stafford38.Geometry.GeneralDivisorialVisibleFrame
22 open Stafford38.Geometry.RelativeCoefficientDVR
23 open Stafford38.Geometry.RelativeRetainedBoundaryPlace
24 open Stafford38.Geometry.SelectedResidueCoefficientLocalization
25 
26 universe u
27 
28 /-- The Option-indexed coordinate values attached to one selected residue
29 indexing and one normalized projective column. `none` is the divisor
30 parameter; `some i` is the same retained chart row chosen by `index`. -/
31 def actualOptionCoordinateValues
32     {B : Type u} (m d : ℕ) (chart : Fin (m + 1))
33     (qB : Fin (m + 1) → B) (index : Fin d → Fin m) (s : B) :
34     Option (Fin d) → B := fun j =>
35       match j with
36       | none => s
37       | some i => qB ((chartAffineCoordinateEquiv chart) (index i)).1
38 
39 /-- The canonical algebra map for the actual divisor parameter and the
40 selected rows of the same normalized projective column. Its coefficient map is
41 the one induced by the canonical chart-subalgebra inclusion into the actual
42 integral closure. -/
43 def actualOptionCoordinateAlgebraMap
44     {k B : Type u} [CommSemiring k] [CommSemiring B] [Algebra k B]
45     (d : ℕ) (values : Option (Fin d) → B) :
46     MvPolynomial (Option (Fin d)) k →ₐ[k] B :=
47   MvPolynomial.aeval values
48 
49 @[simp] theorem actualOptionCoordinateAlgebraMap_X_none
50     {k B : Type u} [CommSemiring k] [CommSemiring B] [Algebra k B]
51     (d : ℕ) (values : Option (Fin d) → B) :
52     actualOptionCoordinateAlgebraMap d values
53       (MvPolynomial.X (R := k) (none : Option (Fin d))) =
54       values none := by
55   exact MvPolynomial.aeval_X values none
56 
57 @[simp] theorem actualOptionCoordinateAlgebraMap_X_some
58     {k B : Type u} [CommSemiring k] [CommSemiring B] [Algebra k B]
59     (d : ℕ) (values : Option (Fin d) → B) (i : Fin d) :
60     actualOptionCoordinateAlgebraMap d values
61       (MvPolynomial.X (R := k) (some i : Option (Fin d))) =
62       values (some i) := by
63   exact MvPolynomial.aeval_X values (some i)
64 
65 @[simp] theorem actualOptionCoordinateAlgebraMap_C
66     {k B : Type u} [CommSemiring k] [CommSemiring B] [Algebra k B]
67     (d : ℕ) (values : Option (Fin d) → B) (c : k) :
68     actualOptionCoordinateAlgebraMap d values (MvPolynomial.C (R := k) c) = algebraMap k B c := by
69   exact MvPolynomial.aeval_C values c
70 
71 /-- The `R`-algebra structure induced by this single map is compatible with
72 the retained ground `k`-algebra structure. -/
73 theorem actualOptionCoordinateMap_scalarTower
74     {k B : Type u} [CommSemiring k] [CommSemiring B] [Algebra k B]
75     (d : ℕ) (values : Option (Fin d) → B) :
76     let f := actualOptionCoordinateAlgebraMap d values
77     letI : Algebra (MvPolynomial (Option (Fin d)) k) B := f.toRingHom.toAlgebra
78     IsScalarTower k (MvPolynomial (Option (Fin d)) k) B := by
79   let f : MvPolynomial (Option (Fin d)) k →ₐ[k] B :=
80     actualOptionCoordinateAlgebraMap d values
81   letI : Algebra (MvPolynomial (Option (Fin d)) k) B := f.toRingHom.toAlgebra
82   apply IsScalarTower.of_algebraMap_eq'
83   ext c
84   change algebraMap k B c = f (algebraMap k (MvPolynomial (Option (Fin d)) k) c)
85   exact (f.commutes c).symm
86 
87 /-- The unique integral-closure column selected by the retained witness. Its
88 coordinates are fixed by the component-field inclusion, so later consumers do
89 not independently choose a second column. -/
90 noncomputable def actualNormalizedProjectiveColumnInIntegralClosure
91     {k : Type u} [Field k] [CharZero k]
92     {m : ℕ} (hm : 0 < m)
93     (P : PrimeSpectrum (MvPolynomial (Fin m) k))
94     (w : GeneralDivisorialVisibleFrameWitness hm P) :
95     let C := w.column
96     let W := C.W
97     let F := ComponentFractionField P
98     letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra
99     let e := chartAffineCoordinateEquiv C.chart
100     let Q : Subalgebra k F := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e))
101     let B := integralClosure Q.toSubring F
102     Fin (m + 1) → B := by
103   classical
104   dsimp only
105   exact Classical.choose
106     (Stafford38.Geometry.ActualSmoothOpenChartNumerator.exists_actual_normalizedProjectiveColumn_in_integralClosure
107       hm P w)
108 
109 theorem actualNormalizedProjectiveColumnInIntegralClosure_spec
110     {k : Type u} [Field k] [CharZero k]
111     {m : ℕ} (hm : 0 < m)
112     (P : PrimeSpectrum (MvPolynomial (Fin m) k))
113     (w : GeneralDivisorialVisibleFrameWitness hm P) :
114     let C := w.column
115     let W := C.W
116     let F := ComponentFractionField P
117     letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra
118     let e := chartAffineCoordinateEquiv C.chart
119     let Q : Subalgebra k F := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e))
120     let B := integralClosure Q.toSubring F
121     let qB := actualNormalizedProjectiveColumnInIntegralClosure hm P w
122     qB C.chart = 1 ∧
123       (∀ a, ((qB a : B) : F) = ((C.q a : C.W.place.valuation.toSubring) : F)) ∧
124       (∀ i : Fin m, ((qB (e i).1 : B) : F) = chartGenericPoint P C.chart e i) := by
125   classical
126   dsimp only
127   exact Classical.choose_spec
128     (Stafford38.Geometry.ActualSmoothOpenChartNumerator.exists_actual_normalizedProjectiveColumn_in_integralClosure
129       hm P w)
130 
131 /-- Bind the actual retained normalized projective column and the actual
132 selected residue rows into one Option-indexed polynomial map to the same
133 integral closure. No row values are accepted as premises: they are obtained
134 from the retained witness's chart algebra and the selected index map. -/
135 theorem exists_actual_option_coordinate_map
136     {k : Type u} [Field k] [CharZero k]
137     {m d : ℕ} (hm : 0 < m)
138     (P : PrimeSpectrum (MvPolynomial (Fin m) k))
139     (w : GeneralDivisorialVisibleFrameWitness hm P)
140     (index : Fin d → Fin m)
141     (s : integralClosure
142       ((Algebra.adjoin k (Set.range
143         (chartGenericPoint P w.column.chart
144           (chartAffineCoordinateEquiv w.column.chart)))).toSubring)
145       (ComponentFractionField P)) :
146     let C := w.column
147     let W := C.W
148     let F := ComponentFractionField P
149     letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra
150     let e := chartAffineCoordinateEquiv C.chart
151     let Q : Subalgebra k F := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e))
152     let B := integralClosure Q.toSubring F
153     let coeff : k →+* B :=
154       (chartSubalgebraToIntegralClosure Q).comp (algebraMap k Q)
155     letI : Algebra k B := coeff.toAlgebra
156     ∃ qB : Fin (m + 1) → B, ∃ f : MvPolynomial (Option (Fin d)) k →ₐ[k] B,
157       qB C.chart = 1 ∧
158       (∀ a, ((qB a : B) : F) = ((C.q a : C.W.place.valuation.toSubring) : F)) ∧
159       (∀ i : Fin m, ((qB (e i).1 : B) : F) = chartGenericPoint P C.chart e i) ∧
160       f (MvPolynomial.X (R := k) (none : Option (Fin d))) = s ∧
161       (∀ i : Fin d, f (MvPolynomial.X (R := k) (some i : Option (Fin d))) =
162         qB (e (index i)).1) ∧
163       (∀ c : k, f (MvPolynomial.C (R := k) c) = coeff c) := by
164   classical
165   dsimp only
166   let C := w.column
167   let W := C.W
168   let F := ComponentFractionField P
169   letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra
170   let e := chartAffineCoordinateEquiv C.chart
171   let Q : Subalgebra k F := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e))
172   let B := integralClosure Q.toSubring F
173   let coeff : k →+* B :=
174     (chartSubalgebraToIntegralClosure Q).comp (algebraMap k Q)
175   letI : Algebra k B := coeff.toAlgebra
176   let qB : Fin (m + 1) → B := actualNormalizedProjectiveColumnInIntegralClosure hm P w
177   obtain ⟨hchart, hcoe, hrows⟩ :=
178     actualNormalizedProjectiveColumnInIntegralClosure_spec hm P w
179   let values : Option (Fin d) → B := actualOptionCoordinateValues m d C.chart qB index s
180   let f : MvPolynomial (Option (Fin d)) k →ₐ[k] B :=
181     actualOptionCoordinateAlgebraMap d values
182   refine ⟨qB, f, hchart, hcoe, hrows, ?_, ?_, ?_⟩
183   · simp [f, values, actualOptionCoordinateAlgebraMap, actualOptionCoordinateValues]
184   · intro i
185     simp [f, values, actualOptionCoordinateAlgebraMap,
186       actualOptionCoordinateValues, C]
187   · intro c
188     calc
189       f (MvPolynomial.C (R := k) c) = algebraMap k B c := by
190         simp [f, actualOptionCoordinateAlgebraMap]
191       _ = coeff c := rfl
192 
193 /-- The selected actual integral-closure column maps to the same retained
194 column after the checked localization equivalence. This isolates the map
195 coherence needed before applying the generic numerator/order transport. -/
196 theorem actual_normalized_column_map_eq_retained
197     {k : Type u} [Field k] [CharZero k]
198     {m : ℕ} (hm : 0 < m)
199     (P : PrimeSpectrum (MvPolynomial (Fin m) k))
200     (w : GeneralDivisorialVisibleFrameWitness hm P) :
201     let C := w.column
202     let F := ComponentFractionField P
203     letI : Algebra (CoordinateZeroLocalRing C.W.coefficientField) F := C.W.ambientAlgebra
204     let echart := chartAffineCoordinateEquiv C.chart
205     let Q : Subalgebra k F := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart echart))
206     let B := integralClosure Q.toSubring F
207     let V : Subring F := C.W.place.valuation.toSubring
208     ∀ (center : PrimeSpectrum B),
209       (e : Localization.AtPrime center.asIdeal ≃+* V) →
210       (hlocalF : ∀ b : B,
211         ((e (algebraMap B (Localization.AtPrime center.asIdeal) b) : V) : F) = (b : F)) →
212       let qB := actualNormalizedProjectiveColumnInIntegralClosure hm P w
213       e (algebraMap B (Localization.AtPrime center.asIdeal) (qB 0)) = C.q 0 ∧
214       e (algebraMap B (Localization.AtPrime center.asIdeal)
215           (qB (Fin.succ ⟨0, hm⟩))) = C.q (Fin.succ ⟨0, hm⟩) := by
216   classical
217   dsimp only
218   intro center e hlocalF
219   let C := w.column
220   let F := ComponentFractionField P
221   letI : Algebra (CoordinateZeroLocalRing C.W.coefficientField) F := C.W.ambientAlgebra
222   let echart := chartAffineCoordinateEquiv C.chart
223   let Q : Subalgebra k F := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart echart))
224   let B := integralClosure Q.toSubring F
225   let V : Subring F := C.W.place.valuation.toSubring
226   let qB : Fin (m + 1) → B := actualNormalizedProjectiveColumnInIntegralClosure hm P w
227   obtain ⟨_hchart, hqB, _hrows⟩ :=
228     actualNormalizedProjectiveColumnInIntegralClosure_spec hm P w
229   have hq0 : e (algebraMap B (Localization.AtPrime center.asIdeal) (qB 0)) = C.q 0 := by
230     apply Subtype.ext
231     change ((e (algebraMap B (Localization.AtPrime center.asIdeal) (qB 0)) : V) : F) =
232       ((C.q 0 : V) : F)
233     rw [hlocalF]
234     exact hqB 0
235   have hq1 : e (algebraMap B (Localization.AtPrime center.asIdeal)
236       (qB (Fin.succ ⟨0, hm⟩))) = C.q (Fin.succ ⟨0, hm⟩) := by
237     apply Subtype.ext
238     change ((e (algebraMap B (Localization.AtPrime center.asIdeal)
239       (qB (Fin.succ ⟨0, hm⟩))) : V) : F) =
240       ((C.q (Fin.succ ⟨0, hm⟩) : V) : F)
241     rw [hlocalF]
242     exact hqB (Fin.succ ⟨0, hm⟩)
243   exact ⟨hq0, hq1⟩
244 
245 /-- The retained visible frame itself supplies the uniformizer powers of its
246 position and distinguished chart coordinates. No selected order is assumed. -/
247 theorem retained_frame_coordinate_orders
248     {k : Type u} [Field k] [CharZero k]
249     {m : ℕ} (hm : 0 < m)
250     (P : PrimeSpectrum (MvPolynomial (Fin m) k))
251     (w : GeneralDivisorialVisibleFrameWitness hm P) :
252     let C := w.column
253     let W := C.W
254     let F := ComponentFractionField P
255     letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra
256     let V : Subring F := W.place.valuation.toSubring
257     letI : IsDiscreteValuationRing V := W.place.isDiscrete
258     letI : IsLocalRing V := W.place.isDiscrete.toIsLocalRing
259     letI : Algebra W.coefficientField V :=
260       (relativeCoefficientMap W.coefficientField W.place).toAlgebra
261     letI : Algebra k V := C.groundCoeff.toAlgebra
262     letI : Algebra V F := V.subtype.toAlgebra
263     letI : IsScalarTower k V F := C.groundTower
264     let D := w.differential.core.D
265     C.q 0 = Stafford38.Geometry.CompletedDVRPowerSeries.chosenUniformizer V ^ D.a * D.u ∧
266     C.q (Fin.succ ⟨0, hm⟩) =
267       Stafford38.Geometry.CompletedDVRPowerSeries.chosenUniformizer V ^ (D.a + D.e) * D.w := by
268   classical
269   dsimp only
270   let C := w.column
271   let W := C.W
272   let F := ComponentFractionField P
273   letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra
274   let V : Subring F := W.place.valuation.toSubring
275   letI : IsDiscreteValuationRing V := W.place.isDiscrete
276   letI : IsLocalRing V := W.place.isDiscrete.toIsLocalRing
277   letI : Algebra W.coefficientField V :=
278     (relativeCoefficientMap W.coefficientField W.place).toAlgebra
279   letI : Algebra k V := C.groundCoeff.toAlgebra
280   letI : Algebra V F := V.subtype.toAlgebra
281   letI : IsScalarTower k V F := C.groundTower
282   let D := w.differential.core.D
283   have ht : D.t = Stafford38.Geometry.CompletedDVRPowerSeries.chosenUniformizer V :=
284     w.differential.core.D_uniformizer
285   have h0 : C.q 0 = D.t ^ D.a * D.u := by
286     calc
287       C.q 0 = D.Q₀ := w.differential.core.D_Q0.symm
288       _ = D.t ^ D.a * D.u := D.Q₀_eq
289   have h1 : C.q (Fin.succ ⟨0, hm⟩) = D.t ^ (D.a + D.e) * D.w := by
290     calc
291       C.q (Fin.succ ⟨0, hm⟩) = D.Q₁ := w.differential.core.D_Q1.symm
292       _ = D.t ^ (D.a + D.e) * D.w := D.Q₁_eq
293   constructor
294   · rw [h0, ht]
295   · rw [h1, ht]
296 
297 end Stafford38.Geometry.ActualOptionColumnBinding
298