Stafford38/Geometry/ActualSmoothOpenChartNumerator.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Geometry.GeneralDivisorialVisibleFrame
3 public import Stafford38.Geometry.ChartGenericPointFractionRing
4 public import Stafford38.Geometry.RetainedPlaceConormalTransport
5 public import Stafford38.Geometry.HomogenizedAffineEvaluation
6 public import Stafford38.Geometry.ActualChartValuationImage
7 public import Stafford38.Geometry.SelectedResidueNormalizationLocalization
8 
9 @[expose] public section
10 
11 set_option autoImplicit false
12 set_option maxHeartbeats 4000000
13 set_option synthInstance.maxHeartbeats 400000
14 
15 namespace Stafford38.Geometry.ActualSmoothOpenChartNumerator
16 
17 noncomputable section
18 
19 open Stafford38.Geometry.AffineComponentCoordinateSplit
20 open Stafford38.Geometry.ActualChartValuationImage
21 open Stafford38.Geometry.SelectedResidueCoefficientLocalization
22 open Stafford38.Geometry.AsymptoticChartArcAdapter
23 open Stafford38.Geometry.ChartGenericPointFractionRing
24 open Stafford38.Geometry.ComponentFunctionFieldBoundary
25 open Stafford38.Geometry.ComponentProjectiveClosure
26 open Stafford38.Geometry.ComponentProjectiveChartKernel
27 open Stafford38.Geometry.AsymptoticDivisorExistence
28 open Stafford38.Geometry.HomogenizedAffineEvaluation
29 open Stafford38.Geometry.ProjectiveChartCoordinates
30 open Stafford38.Geometry.GeneralDivisorialVisibleFrame
31 open Stafford38.Geometry.LocalizedProjectiveChartTransition
32 open Stafford38.Geometry.RetainedPlaceConormalTransport
33 open Stafford38.Geometry.RelativeCoefficientDVR
34 open Stafford38.Geometry.RelativeRetainedBoundaryPlace
35 open Stafford38.Geometry.RetainedProjectiveCompletion
36 
37 universe u
38 
39 /-- A nonzero function on the original affine component gives a nonzero
40 homogenized numerator in the actual selected chart algebra of the retained
41 projective witness.  Its value in the component function field is exactly the
42 zeroth-coordinate power times the original generic-point value. -/
43 theorem exists_nonzero_homogenized_numerator
44     {k : Type u} [Field k] [CharZero k] {m : ℕ} (hm : 0 < m)
45     (P : PrimeSpectrum (MvPolynomial (Fin m) k))
46     (w : GeneralDivisorialVisibleFrameWitness hm P)
47     (p : MvPolynomial (Fin m) k)
48     (hp : Ideal.Quotient.mk P.asIdeal p ≠ 0) :
49     let C : GeneralDivisorialVisibleFrameColumn hm P := w.column
50     letI : Algebra (CoordinateZeroLocalRing C.W.coefficientField)
51         (ComponentFractionField P) := C.W.ambientAlgebra
52     letI : Algebra (C.W.place.valuation.toSubring)
53         (ComponentFractionField P) := C.W.place.valuation.toSubring.subtype.toAlgebra
54     let e := chartAffineCoordinateEquiv C.chart
55     let F := ComponentFractionField P
56     let Q := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e))
57     ∃ r : Q,
58       (r : F) = MvPolynomial.eval
59         (fun a : Fin (m + 1) ↦ (C.q a : F))
60         (MvPolynomial.map (algebraMap k F) (homogenizeAtZero p)) ∧
61       (r : F) = (C.q 0 : F) ^
62         (MvPolynomial.map (algebraMap k F) p).totalDegree *
63           componentAffineGenericPointMap P p ∧
64       r ≠ 0 := by
65   classical
66   let C := w.column
67   let e := chartAffineCoordinateEquiv C.chart
68   let F := ComponentFractionField P
69   let Q := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e))
70   letI : Algebra (CoordinateZeroLocalRing C.W.coefficientField) F := C.W.ambientAlgebra
71   let V := C.W.place.valuation.toSubring
72   letI : IsDiscreteValuationRing V := C.W.place.isDiscrete
73   letI : Algebra C.W.coefficientField V :=
74     (relativeCoefficientMap C.W.coefficientField C.W.place).toAlgebra
75   letI : Algebra k V := C.groundCoeff.toAlgebra
76   letI : Algebra V F := V.subtype.toAlgebra
77   letI : IsScalarTower k V F := C.groundTower
78   letI : Algebra Q F := Q.val.toAlgebra
79   let qF : Fin (m + 1) → F := fun a ↦ (C.q a : F)
80   have hqF_common : ∀ a, qF a = C.scale * componentProjectivePoint P a :=
81     C.q_commonScale
82   have hqF_zero : qF 0 ≠ 0 := by
83     intro h
84     exact C.q0_ne (Subtype.ext h)
85   have hdehom :
86       ProjectiveConormalDehomogenization.dehomogenizedPoint qF =
87         componentCoordinate P := by
88     funext i
89     change qF i.succ / qF 0 = componentCoordinate P i
90     exact componentCoordinate_eq_div P qF C.scale hqF_common hqF_zero i
91   have hpnot : p ∉ P.asIdeal := by
92     intro hmem
93     exact hp (Ideal.Quotient.eq_zero_iff_mem.mpr hmem)
94   have hgeneric_nonzero : componentAffineGenericPointMap P p ≠ 0 := by
95     intro hzero
96     apply hpnot
97     rw [← componentAffineGenericPointMap_ker P, RingHom.mem_ker]
98     exact hzero
99   let pF : MvPolynomial (Fin m) F := MvPolynomial.map (algebraMap k F) p
100   have hdehom_eval :
101       MvPolynomial.eval
102           (ProjectiveConormalDehomogenization.dehomogenizedPoint qF) pF =
103         componentAffineGenericPointMap P p := by
104     rw [MvPolynomial.eval_map, hdehom]
105     exact (componentAffineGenericPointMap_eq_eval₂ P p).symm
106   have hnumerator_eval :
107       MvPolynomial.eval qF
108           (MvPolynomial.map (algebraMap k F) (homogenizeAtZero p)) =
109         qF 0 ^ pF.totalDegree * componentAffineGenericPointMap P p := by
110     rw [map_homogenizeAtZero,
111       eval_homogenizeAtZero_eq_pow_mul_dehomogenizedPoint pF qF hqF_zero]
112     rw [hdehom_eval]
113   have hnumerator_ne :
114       MvPolynomial.eval qF
115           (MvPolynomial.map (algebraMap k F) (homogenizeAtZero p)) ≠ 0 := by
116     rw [hnumerator_eval]
117     exact mul_ne_zero (pow_ne_zero _ hqF_zero) hgeneric_nonzero
118   have hqmem : ∀ a, qF a ∈ Q := by
119     intro a
120     simpa [qF, C, F, V, Q] using
121       (normalizedCoordinate_mem_chartGenericPointSubalgebra hm P w a)
122   let qQ : Fin (m + 1) → Q := fun a ↦ ⟨qF a, hqmem a⟩
123   let r : Q := MvPolynomial.eval₂ (algebraMap k Q) qQ (homogenizeAtZero p)
124   have hmap_eval :
125       (algebraMap Q F) r =
126         MvPolynomial.eval qF
127           (MvPolynomial.map (algebraMap k F) (homogenizeAtZero p)) := by
128     dsimp [r]
129     have hcomp := (MvPolynomial.eval₂_comp_left
130       (algebraMap Q F) (algebraMap k Q) qQ (homogenizeAtZero p)).symm
131     have hground :
132         (algebraMap Q F).comp (algebraMap k Q) = algebraMap k F :=
133       IsScalarTower.algebraMap_eq k Q F
134     calc
135       (algebraMap Q F)
136           (MvPolynomial.eval₂ (algebraMap k Q) qQ (homogenizeAtZero p)) =
137         MvPolynomial.eval₂
138           ((algebraMap Q F).comp (algebraMap k Q))
139           (fun a ↦ algebraMap Q F (qQ a)) (homogenizeAtZero p) := hcomp.symm
140       _ = MvPolynomial.eval₂ (algebraMap k F) qF (homogenizeAtZero p) := by
141         rw [hground]
142         congr 1
143       _ = MvPolynomial.eval qF
144           (MvPolynomial.map (algebraMap k F) (homogenizeAtZero p)) := by
145         exact (MvPolynomial.eval_map (algebraMap k F) qF (homogenizeAtZero p)).symm
146   have hr_eq :
147       (r : F) = MvPolynomial.eval qF
148         (MvPolynomial.map (algebraMap k F) (homogenizeAtZero p)) := by
149     exact hmap_eval
150   have hr_formula :
151       (r : F) = qF 0 ^ pF.totalDegree * componentAffineGenericPointMap P p := by
152     rw [hr_eq, hnumerator_eval]
153   have hr_ne : r ≠ 0 := by
154     intro h
155     have hF : (r : F) = 0 := congrArg (algebraMap Q F) h
156     apply hnumerator_ne
157     rw [← hr_eq]
158     exact hF
159   exact ⟨r, hr_eq, hr_formula, hr_ne⟩
160 
161 /-- Map the same retained normalized projective column into the canonical
162 integral closure of its actual generic-chart algebra. Every coordinate remains
163 the original witness coordinate in the same component fraction field, and its
164 affine rows remain the selected chart generators. -/
165 theorem exists_actual_normalizedProjectiveColumn_in_integralClosure
166     {k : Type u} [Field k] [CharZero k]
167     {m : ℕ} (hm : 0 < m)
168     (P : PrimeSpectrum (MvPolynomial (Fin m) k))
169     (w : GeneralDivisorialVisibleFrameWitness hm P) :
170     let C := w.column
171     let W := C.W
172     let F := ComponentFractionField P
173     letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra
174     let V := W.place.valuation.toSubring
175     letI : Algebra V F := V.subtype.toAlgebra
176     let e := chartAffineCoordinateEquiv C.chart
177     let Q := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e))
178     let B := integralClosure Q.toSubring F
179     ∃ qB : Fin (m + 1) → B,
180       qB C.chart = 1 ∧
181       (∀ a, ((qB a : B) : F) = ((C.q a : V) : F)) ∧
182       (∀ i : Fin m, ((qB (e i).1 : B) : F) =
183         chartGenericPoint P C.chart e i) := by
184   classical
185   dsimp only
186   let C := w.column
187   let W := C.W
188   let F := ComponentFractionField P
189   letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra
190   let V := W.place.valuation.toSubring
191   letI : IsDiscreteValuationRing V := W.place.isDiscrete
192   letI : IsLocalRing V := W.place.isDiscrete.toIsLocalRing
193   letI : Algebra W.coefficientField V :=
194     (relativeCoefficientMap W.coefficientField W.place).toAlgebra
195   letI : Algebra V F := V.subtype.toAlgebra
196   letI := C.groundCoeff.toAlgebra
197   letI := C.groundTower
198   let e := chartAffineCoordinateEquiv C.chart
199   let Q := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e))
200   let B := integralClosure Q.toSubring F
201   obtain ⟨qQ, hchart, hcoe, hrows⟩ :=
202     exists_actual_normalizedProjectiveColumn hm P w
203   let qToB : Q →+* B := chartSubalgebraToIntegralClosure Q
204   let qB : Fin (m + 1) → B := fun a ↦ qToB (qQ a)
205   have hchartB : qB C.chart = 1 := by
206     change qToB (qQ C.chart) = 1
207     rw [hchart, map_one]
208   have hcoeB : ∀ a, ((qB a : B) : F) = ((C.q a : V) : F) := by
209     intro a
210     calc
211       ((qB a : B) : F) = ((qQ a : Q) : F) := by
212         change ((chartSubalgebraToIntegralClosure Q (qQ a) : B) : F) = _
213         exact coe_chartSubalgebraToIntegralClosure Q (qQ a)
214       _ = ((C.q a : V) : F) := hcoe a
215   have hrowsB : ∀ i : Fin m, ((qB (e i).1 : B) : F) =
216       chartGenericPoint P C.chart e i := by
217     intro i
218     calc
219       ((qB (e i).1 : B) : F) = ((qQ (e i).1 : Q) : F) := by
220         change ((chartSubalgebraToIntegralClosure Q (qQ (e i).1) : B) : F) = _
221         exact coe_chartSubalgebraToIntegralClosure Q (qQ (e i).1)
222       _ = chartGenericPoint P C.chart e i := hrows i
223   exact ⟨qB, hchartB, hcoeB, hrowsB⟩
224 
225 
226 end
227 end Stafford38.Geometry.ActualSmoothOpenChartNumerator
228