Stafford38/Geometry/SameWitness/CommonOpenEtale.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Geometry.SameWitness.CommonOpenArc
3 public import Stafford38.Geometry.SameWitness.ChartGroundMap
4 public import Stafford38.Geometry.A0ChartFormalEtale
5 public import Stafford38.Geometry.EtaleGenericOpenExtraAwayB
6 
7 @[expose] public section
8 
9 set_option autoImplicit false
10 set_option maxHeartbeats 1600000
11 
12 noncomputable section
13 
14 namespace Stafford38.Geometry.SameWitness
15 
16 open Stafford38.Geometry.A0ChartFormalEtale
17 open Stafford38.Geometry.EtaleGenericOpenTransport
18 open Stafford38.Geometry.GeneralDivisorialVisibleFrame
19 open Stafford38.Geometry.ActualSelectedNormalizationDivisorEtale
20 open Stafford38.Geometry.ProjectiveChartSameFieldOverlap
21 
22 universe u
23 
24 /-- Polynomial coordinates compose with a ground-compatible map to an open
25 algebra without installing another scalar action. -/
26 private def coordinateMapToOpen
27     {k R B U : Type u} [CommSemiring k] [Semiring R] [Semiring B] [Semiring U]
28     [Algebra k R] [Algebra k B] [Algebra k U]
29     (f : R →ₐ[k] B) (F : B →+* U)
30     (hF : F.comp (algebraMap k B) = algebraMap k U) : R →ₐ[k] U where
31   toRingHom := F.comp f.toRingHom
32   commutes' c := (congrArg F (f.commutes c)).trans (RingHom.congr_fun hF c)
33 
34 /-- Point-local formal étaleness transports to the explicit polynomial map
35 on the common open (paper proof, common-open étale step). -/
36 private theorem formallyEtale_coordinateMapToOpen
37     {k R B Q : Type u} [Field k] [CommRing R] [CommRing B] [CommRing Q]
38     [Algebra k R] [Algebra k B] [Algebra k Q] [Algebra Q B]
39     (fCoord : R →ₐ[k] B) (M : Ideal B) [M.IsPrime]
40     (hEtM : letI : Algebra R B := fCoord.toRingHom.toAlgebra
41       Algebra.FormallyEtale R (Localization.AtPrime M))
42     (f : Q) (e : Localization.Away f ≃ₐ[Q] Localization.Away (algebraMap Q B f))
43     (g : Q)
44     (hbase : (genericOpenExtraAwayBMap M f e g).comp (algebraMap k B) =
45       algebraMap k (genericOpenExtraAwayB M f e g)) :
46     @Algebra.FormallyEtale R (genericOpenExtraAwayB M f e g) _ _
47       (@RingHom.toAlgebra R (genericOpenExtraAwayB M f e g) inferInstance inferInstance
48         (coordinateMapToOpen fCoord (genericOpenExtraAwayBMap M f e g) hbase).toRingHom) := by
49   letI : Algebra R B := fCoord.toRingHom.toAlgebra
50   letI : Algebra.FormallyEtale R (Localization.AtPrime M) := hEtM
51   let Cq := genericOpenRing M f e
52   let U := genericOpenExtraAwayB M f e g
53   letI : Algebra R Cq := ((algebraMap B Cq).comp fCoord.toRingHom).toAlgebra
54   let rawAction : Algebra R U := Algebra.compHom U (algebraMap R Cq)
55   have hRaw : @Algebra.FormallyEtale R U _ _ rawAction :=
56     formallyEtale_genericOpenExtraAway_of_pointLocal M f e g
57   have hAction : rawAction =
58       (@RingHom.toAlgebra R (genericOpenExtraAwayB M f e g) inferInstance inferInstance
59         (coordinateMapToOpen fCoord (genericOpenExtraAwayBMap M f e g) hbase).toRingHom) := by
60     apply Algebra.algebra_ext
61     intro x
62     rfl
63   exact hAction ▸ hRaw
64 
65 /-- The original-chart map and selected polynomial coordinates are k-algebra
66 maps on the same common open, with the formally-etale structures required by
67 the affine-fibre endpoint (paper proof, common-open étale step). -/
68 structure CommonOpenEtaleData
69     {k : Type u} [Field k] [CharZero k] [IsAlgClosed k]
70     {m : ℕ} (hm : 0 < m)
71     (P : PrimeSpectrum (MvPolynomial (Fin m) k))
72     (w : GeneralDivisorialVisibleFrameWitness hm P)
73     (setup : ChartSetup hm P w)
74     (coords : CoordinatePresentation hm P w setup)
75     (arc : CommonOpenArcData hm P w setup coords) where
76   φk : OriginalAffineChartQuotient (k := k) P →ₐ[k] arc.common.U
77   ψU : MvPolynomial (Option (Fin (@Fintype.card coords.t coords.htFinite))) k
78       →ₐ[k] arc.common.U
79   hφAction : φk.toRingHom = arc.common.φ
80   hψAction :
81     letI : arc.common.M.IsMaximal := arc.common.hM
82     let B := actualSelectedNormalization P w
83     let R := MvPolynomial (Option (Fin (@Fintype.card coords.t coords.htFinite))) k
84     ((algebraMap arc.common.Cq arc.common.U).comp
85       ((algebraMap B arc.common.Cq).comp
86         (@AlgHom.toRingHom k R B inferInstance inferInstance inferInstance
87           inferInstance coords.coeff.toAlgebra coords.fFin))).toAlgebra =
88       (@RingHom.toAlgebra (MvPolynomial (Option (Fin (@Fintype.card coords.t coords.htFinite))) k) arc.common.U inferInstance inferInstance ψU.toRingHom)
89   hφEtale : @Algebra.FormallyEtale
90     (OriginalAffineChartQuotient (k := k) P) arc.common.U _ _
91     (@RingHom.toAlgebra (OriginalAffineChartQuotient (k := k) P) arc.common.U inferInstance inferInstance φk.toRingHom)
92   hψEtale : @Algebra.FormallyEtale
93     (MvPolynomial (Option (Fin (@Fintype.card coords.t coords.htFinite))) k)
94     arc.common.U _ _ (@RingHom.toAlgebra (MvPolynomial (Option (Fin (@Fintype.card coords.t coords.htFinite))) k) arc.common.U inferInstance inferInstance ψU.toRingHom)
95 
96 /-- The T13 ground-map identity extends to the inherited k-algebra structure
97 on the common open by the actual normalization map (paper proof, common-open
98 étale step). -/
99 private theorem originalChartToCommonOpen_groundMap_k
100     {k : Type u} [Field k] [CharZero k] [IsAlgClosed k]
101     {m : ℕ} (hm : 0 < m)
102     (P : PrimeSpectrum (MvPolynomial (Fin m) k))
103     (w : GeneralDivisorialVisibleFrameWitness hm P)
104     (setup : ChartSetup hm P w)
105     (coords : CoordinatePresentation hm P w setup)
106     (arc : CommonOpenArcData hm P w setup coords) :
107     arc.common.φ.comp
108       (algebraMap k (OriginalAffineChartQuotient (k := k) P)) =
109         algebraMap k arc.common.U := by
110   letI : arc.common.M.IsMaximal := arc.common.hM
111   let Q := actualSelectedChartAlgebra P w
112   let B := actualSelectedNormalization P w
113   let qToU : Q →+* arc.common.U :=
114     (algebraMap arc.common.Cq arc.common.U).comp (algebraMap Q arc.common.Cq)
115   have hφQ := originalAffineChartToCommonOpen_groundMap
116     P setup.j arc.common.hxj arc.common.hsel arc.common.M setup.f setup.e
117   have hφQ' : arc.common.φ.comp
118       (algebraMap k (OriginalAffineChartQuotient (k := k) P)) =
119         qToU.comp (algebraMap k Q) := by
120     change arc.common.φ.comp
121       (algebraMap k (OriginalAffineChartQuotient (k := k) P)) =
122         qToU.comp (algebraMap k Q) at hφQ
123     exact hφQ
124   have hcoeff : @algebraMap k B _ _ coords.coeff.toAlgebra =
125       (algebraMap Q B).comp (algebraMap k Q) := by
126     rw [coords.hcoeff]
127     apply RingHom.ext
128     intro c
129     rfl
130   apply RingHom.ext
131   intro c
132   have hφc := congrArg (fun f : k →+* arc.common.U => f c) hφQ'
133   have hQc := congrArg (fun f : Q →+* arc.common.U => f (algebraMap k Q c))
134     arc.common.hbaseMap
135   have hkUc := congrArg (fun f : k →+* arc.common.U => f c) arc.hbaseMap
136   have hcoeffc := congrArg (fun f : k →+* B => f c) hcoeff
137   calc
138     arc.common.φ (algebraMap k (OriginalAffineChartQuotient (k := k) P) c) =
139         qToU (algebraMap k Q c) := hφc
140     _ = genericOpenExtraAwayBMap arc.common.M setup.f setup.e arc.common.g
141         (algebraMap Q B (algebraMap k Q c)) := by
142           exact hQc.symm
143     _ = genericOpenExtraAwayBMap arc.common.M setup.f setup.e arc.common.g
144         (@algebraMap k B _ _ coords.coeff.toAlgebra c) := by
145           exact congrArg (genericOpenExtraAwayBMap arc.common.M setup.f setup.e arc.common.g)
146             hcoeffc.symm
147     _ = algebraMap k arc.common.U c := hkUc
148 
149 /-- The common-open étale maps are obtained from the selected chart map and
150 the retained ground-point formal-etale certificate. -/
151 theorem nonempty_commonOpenEtaleData
152     {k : Type u} [Field k] [CharZero k] [IsAlgClosed k]
153     {m : ℕ} (hm : 0 < m)
154     (P : PrimeSpectrum (MvPolynomial (Fin m) k))
155     (w : GeneralDivisorialVisibleFrameWitness hm P)
156     (setup : ChartSetup hm P w)
157     (coords : CoordinatePresentation hm P w setup)
158     (arc : CommonOpenArcData hm P w setup coords) :
159     Nonempty (CommonOpenEtaleData hm P w setup coords arc) := by
160   classical
161   letI : arc.common.M.IsMaximal := arc.common.hM
162   let B := actualSelectedNormalization P w
163   let Q := actualSelectedChartAlgebra P w
164   let R := MvPolynomial (Option (Fin (@Fintype.card coords.t coords.htFinite))) k
165   let fFin : R →+* B := @AlgHom.toRingHom k R B
166     inferInstance inferInstance inferInstance inferInstance coords.coeff.toAlgebra coords.fFin
167   let φk : OriginalAffineChartQuotient (k := k) P →ₐ[k] arc.common.U :=
168     { toRingHom := arc.common.φ
169       commutes' := fun c =>
170         congrArg (fun f : k →+* arc.common.U => f c)
171           (originalChartToCommonOpen_groundMap_k hm P w setup coords arc) }
172   let ψU : R →ₐ[k] arc.common.U := @coordinateMapToOpen k R B arc.common.U
173     inferInstance inferInstance inferInstance inferInstance inferInstance
174     coords.coeff.toAlgebra _ coords.fFin
175     (genericOpenExtraAwayBMap arc.common.M setup.f setup.e arc.common.g) arc.hbaseMap
176   have hφEtale : @Algebra.FormallyEtale
177       (OriginalAffineChartQuotient (k := k) P) arc.common.U _ _
178       (@RingHom.toAlgebra (OriginalAffineChartQuotient (k := k) P) arc.common.U inferInstance inferInstance φk.toRingHom) := by
179     exact formallyEtale_originalAffineChartToCommonOpen
180       P setup.j arc.common.hxj arc.common.hsel arc.common.M setup.f setup.e
181   have hψAction : ((algebraMap arc.common.Cq arc.common.U).comp
182       ((algebraMap B arc.common.Cq).comp fFin)).toAlgebra =
183         (@RingHom.toAlgebra (MvPolynomial (Option (Fin (@Fintype.card coords.t coords.htFinite))) k) arc.common.U inferInstance inferInstance ψU.toRingHom) := by
184     apply Algebra.algebra_ext
185     intro x
186     rfl
187   have hψEtale : @Algebra.FormallyEtale R arc.common.U _ _
188       (@RingHom.toAlgebra R arc.common.U inferInstance inferInstance ψU.toRingHom) := by
189     apply @formallyEtale_coordinateMapToOpen k R B Q
190       inferInstance inferInstance inferInstance inferInstance inferInstance
191       coords.coeff.toAlgebra inferInstance inferInstance coords.fFin
192       arc.common.M (inferInstance : arc.common.M.IsPrime) arc.common.hEtM
193       setup.f setup.e arc.common.g arc.hbaseMap
194   exact ⟨{
195     φk := φk
196     hφAction := rfl
197     ψU := ψU
198     hφEtale := hφEtale
199     hψEtale := hψEtale
200     hψAction := hψAction
201   }⟩
202 
203 end Stafford38.Geometry.SameWitness
204 
205 end
206