Stafford38/Geometry/A0NormalizedProjectiveCoordinates.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Geometry.A0ChartGeneratorCoordinates
3 public import Stafford38.Geometry.ChartGenericPointFractionRing
4 
5 @[expose] public section
6 
7 set_option autoImplicit false
8 set_option maxHeartbeats 2400000
9 
10 noncomputable section
11 namespace Stafford38.Geometry.A0NormalizedProjectiveCoordinates
12 
13 open Stafford38.Geometry.ProjectiveChartSameFieldOverlap
14 open Stafford38.Geometry.A0ChartFormalEtale
15 open Stafford38.Geometry.A0ChartGeneratorCoordinates
16 open Stafford38.Geometry.EtaleGenericOpenTransport
17 open Stafford38.Geometry.AffineComponentCoordinateSplit
18 open Stafford38.Geometry.ComponentFunctionFieldBoundary
19 open Stafford38.Geometry.ComponentProjectiveChartKernel
20 open Stafford38.Geometry.ChartGenericPointFractionRing
21 
22 universe u v w
23 
24 private theorem selectedChartAwayEquiv_base
25     {k : Type u} [Field k] {m : ℕ}
26     {Q : Type v} [CommRing Q] [Algebra k Q]
27     (P : PrimeSpectrum (MvPolynomial (Fin m) k)) (j : Fin m)
28     (hsel : SelectedAffineChartQuotient (k := k) P j ≃ₐ[k] Q)
29     (x : SelectedAffineChartQuotient (k := k) P j) :
30     selectedChartAwayEquivOfQuotientEquiv P j hsel
31       (algebraMap (SelectedAffineChartQuotient (k := k) P j)
32         (SelectedAffineChartLocalization (k := k) P j) x) =
33       algebraMap Q (Localization.Away (hsel (selectedAffineChartDenominator P j)))
34         (hsel x) := by
35   let R := SelectedAffineChartQuotient (k := k) P j
36   let S := SelectedAffineChartLocalization (k := k) P j
37   let T := Localization.Away (hsel (selectedAffineChartDenominator P j))
38   let M := Submonoid.powers (selectedAffineChartDenominator P j)
39   let N := Submonoid.powers (hsel (selectedAffineChartDenominator P j))
40   letI : IsLocalization M S := Localization.isLocalization
41   letI : IsLocalization.Away
42       (hsel.toRingEquiv.toRingHom (selectedAffineChartDenominator P j)) T :=
43     Localization.isLocalization
44   have hmap : Submonoid.map hsel M = N := by
45     simp [M, N, Submonoid.map_powers]
46   change IsLocalization.algEquivOfAlgEquiv
47       (S := S) (Q := T) (h := hsel) hmap
48     (algebraMap R S x) = algebraMap Q T (hsel x)
49   exact IsLocalization.algEquivOfAlgEquiv_eq
50     (S := S) (Q := T) (h := hsel) hmap x
51 
52 /-- In the common open, the original variable belonging to the selected
53 projective chart is the inverse of the distinguished chart coordinate. -/
54 theorem canonicalChart_selectedGenerator_product
55     {k : Type u} [Field k] {m : ℕ}
56     (P : PrimeSpectrum (MvPolynomial (Fin m) k)) (j : Fin m)
57     (hxj : componentCoordinate P j ≠ 0)
58     {B : Type w} [CommRing B]
59     [Algebra
60       (Algebra.adjoin k (Set.range
61         (chartGenericPoint P (Fin.succ j) (SelectedAffineCoordinateEquiv j)))) B]
62     (M : Ideal B) [M.IsPrime]
63     (f : Algebra.adjoin k (Set.range
64       (chartGenericPoint P (Fin.succ j) (SelectedAffineCoordinateEquiv j))))
65     (e : Localization.Away f ≃ₐ[
66       Algebra.adjoin k (Set.range
67         (chartGenericPoint P (Fin.succ j) (SelectedAffineCoordinateEquiv j)))]
68       Localization.Away (algebraMap _ B f)) :
69     let Q := Algebra.adjoin k (Set.range
70       (chartGenericPoint P (Fin.succ j) (SelectedAffineCoordinateEquiv j)))
71     let hsel : SelectedAffineChartQuotient (k := k) P j ≃ₐ[k] Q :=
72       componentChartEquationQuotient_equiv_genericSubalgebra P (Fin.succ j)
73         (SelectedAffineCoordinateEquiv j) (by
74           simpa [componentProjectivePoint] using hxj)
75     let g := hsel (selectedAffineChartDenominator P j)
76     let Cq := genericOpenRing M f e
77     let C := genericOpenExtraAwayB M f e g
78     letI : Semiring C := (inferInstance : CommSemiring C).toSemiring
79     letI : Algebra Q Cq := inferInstance
80     letI : Algebra Cq C := inferInstance
81     letI : Algebra Q C := Algebra.compHom C (algebraMap Q Cq)
82     algebraMap Cq C (algebraMap Q Cq g) *
83       originalAffineChartToCommonOpen P j hxj hsel M f e
84         (Ideal.Quotient.mk P.asIdeal (MvPolynomial.X j)) = 1 := by
85   exact selectedGenerator_commonOpen_product P j hxj
86     (componentChartEquationQuotient_equiv_genericSubalgebra P (Fin.succ j)
87       (SelectedAffineCoordinateEquiv j) (by
88         simpa [componentProjectivePoint] using hxj)) M f e
89 
90 /-- The canonical selected-chart generic point, transported into the actual
91 common open, gives every normalized projective coordinate.  Its selected
92 coordinate is one, and every other coordinate equals the distinguished
93 coordinate times the corresponding original affine generator. -/
94 theorem canonicalChart_all_normalized_projective_coordinates
95     {k : Type u} [Field k] {m : ℕ}
96     (P : PrimeSpectrum (MvPolynomial (Fin m) k)) (j : Fin m)
97     (hxj : componentCoordinate P j ≠ 0)
98     {B : Type w} [CommRing B]
99     [Algebra
100       (Algebra.adjoin k (Set.range
101         (chartGenericPoint P (Fin.succ j) (SelectedAffineCoordinateEquiv j)))) B]
102     (M : Ideal B) [M.IsPrime]
103     (f : Algebra.adjoin k (Set.range
104       (chartGenericPoint P (Fin.succ j) (SelectedAffineCoordinateEquiv j))))
105     (e : Localization.Away f ≃ₐ[
106       Algebra.adjoin k (Set.range
107         (chartGenericPoint P (Fin.succ j) (SelectedAffineCoordinateEquiv j)))]
108       Localization.Away (algebraMap _ B f)) :
109     let Q := Algebra.adjoin k (Set.range
110       (chartGenericPoint P (Fin.succ j) (SelectedAffineCoordinateEquiv j)))
111     let hsel : SelectedAffineChartQuotient (k := k) P j ≃ₐ[k] Q :=
112       componentChartEquationQuotient_equiv_genericSubalgebra P (Fin.succ j)
113         (SelectedAffineCoordinateEquiv j) (by
114           simpa [componentProjectivePoint] using hxj)
115     let g := hsel (selectedAffineChartDenominator P j)
116     let Cq := genericOpenRing M f e
117     let C := genericOpenExtraAwayB M f e g
118     letI : Semiring C := (inferInstance : CommSemiring C).toSemiring
119     letI : Algebra Q Cq := inferInstance
120     letI : Algebra Cq C := inferInstance
121     letI : Algebra Q C := Algebra.compHom C (algebraMap Q Cq)
122     let φ := originalAffineChartToCommonOpen P j hxj hsel M f e
123     let q : Fin (m + 1) → C := Fin.cases
124       (algebraMap Cq C (algebraMap Q Cq g))
125       (fun i => if hij : i = j then 1 else
126         algebraMap Cq C (algebraMap Q Cq
127           (hsel (selectedAffineChartVariableClass P j i hij))))
128     q (Fin.succ j) = 1 ∧
129       ∀ i : Fin m, q (Fin.succ i) =
130         q 0 * φ (Ideal.Quotient.mk P.asIdeal (MvPolynomial.X i)) := by
131   dsimp
132   let Q := Algebra.adjoin k (Set.range
133     (chartGenericPoint P (Fin.succ j) (SelectedAffineCoordinateEquiv j)))
134   let hsel : SelectedAffineChartQuotient (k := k) P j ≃ₐ[k] Q :=
135     componentChartEquationQuotient_equiv_genericSubalgebra P (Fin.succ j)
136       (SelectedAffineCoordinateEquiv j) (by
137         simpa [componentProjectivePoint] using hxj)
138   let g := hsel (selectedAffineChartDenominator P j)
139   let Cq := genericOpenRing M f e
140   let C := genericOpenExtraAwayB M f e g
141   letI : Semiring C := (inferInstance : CommSemiring C).toSemiring
142   letI : Algebra Q Cq := inferInstance
143   letI : Algebra Cq C := inferInstance
144   letI : Algebra Q C := Algebra.compHom C (algebraMap Q Cq)
145   let φ := originalAffineChartToCommonOpen P j hxj hsel M f e
146   let q : Fin (m + 1) → C := Fin.cases
147     (algebraMap Cq C (algebraMap Q Cq g))
148     (fun i => if hij : i = j then 1 else
149       algebraMap Cq C (algebraMap Q Cq
150         (hsel (selectedAffineChartVariableClass P j i hij))))
151   constructor
152   · simp [q]
153   · intro i
154     by_cases hij : i = j
155     · subst i
156       simp only [q, Fin.cases_succ, dite_true]
157       have hprod := canonicalChart_selectedGenerator_product P j hxj M f e
158       simpa [Q, hsel, g, Cq, C, φ, Fin.cases, dite_true] using hprod.symm
159     · simp only [q, Fin.cases_succ, dite_false, hij]
160       exact originalGenerator_commonOpen_identity P j i hij hxj hsel M f e
161 
162 /-- Any selected-chart column with the canonical denominator and variable
163 entries has its original-affine projective coordinates on the common open. -/
164 theorem q_column_commonOpen_coordinates
165     {k : Type u} [Field k] {m : ℕ}
166     {Q : Type v} [CommRing Q] [Algebra k Q]
167     {B : Type w} [CommRing B] [Algebra Q B]
168     (P : PrimeSpectrum (MvPolynomial (Fin m) k)) (j : Fin m)
169     (hxj : componentCoordinate P j ≠ 0)
170     (hsel : SelectedAffineChartQuotient (k := k) P j ≃ₐ[k] Q)
171     (M : Ideal B) [M.IsPrime] (f : Q)
172     (e : Localization.Away f ≃ₐ[Q]
173       Localization.Away (algebraMap Q B f))
174     (qQ : Fin (m + 1) → Q)
175     (hchart : qQ (Fin.succ j) = 1)
176     (hzero : qQ 0 = hsel (selectedAffineChartDenominator P j))
177     (hrows : ∀ i : Fin m, ∀ hij : i ≠ j,
178       qQ (Fin.succ i) = hsel (selectedAffineChartVariableClass P j i hij)) :
179     let g := hsel (selectedAffineChartDenominator P j)
180     let Cq := genericOpenRing M f e
181     let C := genericOpenExtraAwayB M f e g
182     letI : Semiring C := (inferInstance : CommSemiring C).toSemiring
183     letI : Algebra Q Cq := inferInstance
184     letI : Algebra Cq C := inferInstance
185     letI : Algebra Q C := Algebra.compHom C (algebraMap Q Cq)
186     let qU : Fin (m + 1) → C := fun i =>
187       algebraMap Cq C (algebraMap Q Cq (qQ i))
188     ∀ i : Fin m,
189       qU (Fin.succ i) = qU 0 *
190         originalAffineChartToCommonOpen P j hxj hsel M f e
191           (Ideal.Quotient.mk P.asIdeal (MvPolynomial.X i)) := by
192   classical
193   dsimp
194   let g := hsel (selectedAffineChartDenominator P j)
195   let Cq := genericOpenRing M f e
196   let C := genericOpenExtraAwayB M f e g
197   letI : Semiring C := (inferInstance : CommSemiring C).toSemiring
198   letI : Algebra Q Cq := inferInstance
199   letI : Algebra Cq C := inferInstance
200   letI : Algebra Q C := Algebra.compHom C (algebraMap Q Cq)
201   intro i
202   by_cases hij : i = j
203   · subst i
204     simpa [hzero, hchart] using
205       (selectedGenerator_commonOpen_product P j hxj hsel M f e).symm
206   · have hother := originalGenerator_commonOpen_identity
207       P j i hij hxj hsel M f e
208     simpa [hzero, hrows i hij] using hother
209 
210 #print axioms canonicalChart_selectedGenerator_product
211 #print axioms canonicalChart_all_normalized_projective_coordinates
212 
213 end Stafford38.Geometry.A0NormalizedProjectiveCoordinates
214 end
215