Stafford38/Geometry/ProjectiveConormalDehomogenization.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Mathlib.RingTheory.Derivation.Basic
3 public import Mathlib.Algebra.BigOperators.Field
4 public import Stafford38.Geometry.JacobianConormalComparison
5 public import Stafford38.Geometry.ProjectiveChartCoordinates
6 public import Stafford38.Geometry.RetractionSpecialization
7 
8 @[expose] public section
9 
10 /-!
11 # Dehomogenizing projective conormal data
12 
13 This file isolates the field-level calculation that turns a projective point,
14 projective tangent columns, and a projective annihilating row into affine
15 conormal data in the chart where the zeroth coordinate is nonzero.
16 
17 No projective closure, normalization, formal chart, tangent-space comparison,
18 Laurent specialization, closure theorem, or coisotropy statement is constructed
19 here.  The tangent-space equality and the base equations are explicit inputs.
20 -/
21 
22 namespace Stafford38.Geometry.ProjectiveConormalDehomogenization
23 
24 open Stafford38.Geometry.AffineConormalClosure
25 open Stafford38.Geometry.AffineConormalSpan
26 open Stafford38.Geometry.JacobianConormalComparison
27 open Stafford38.GeometryRetractionSpecialization
28 
29 noncomputable section
30 
31 variable {K : Type*} [Field K] {n : ℕ}
32 
33 /-- The affine point represented by `q` in the chart `q 0 ≠ 0`. -/
34 def dehomogenizedPoint (q : Fin (n + 1) → K) : Fin n → K :=
35   fun i ↦ q i.succ / q 0
36 
37 /-- The derivative of the affine chart coordinate `q_(i+1) / q_0` in the
38 projective tangent direction `w`. This historical fixed-chart API specializes
39 the shared projective-chart owner using the canonical `Fin.succ` ordering. -/
40 abbrev dehomogenizedTangentColumn
41     (q w : Fin (n + 1) → K) : Fin n → K :=
42   fun i ↦ Stafford38.Geometry.ProjectiveChartCoordinates.dehomogenizedTangentColumn
43     (0 : Fin (n + 1)) q w
44     (Stafford38.Geometry.ProjectiveChartCoordinates.zerothChartEquiv i)
45 
46 @[simp] theorem dehomogenizedTangentColumn_apply
47     (q w : Fin (n + 1) → K) (i : Fin n) :
48     dehomogenizedTangentColumn q w i =
49       (w i.succ * q 0 - q i.succ * w 0) / q 0 ^ 2 := by
50   simp [dehomogenizedTangentColumn,
51     Stafford38.Geometry.ProjectiveChartCoordinates.dehomogenizedTangentColumn]
52 
53 
54 /-- Differentiating actual local chart functions and then dehomogenizing
55 recovers the derivation of their affine coordinates. The multiplicative
56 relations are equations in the same chart algebra, before evaluation. -/
57 theorem dehomogenizedTangentColumn_derivation
58     {k C : Type*} [CommRing k] [CommRing C]
59     [Algebra k C] [Algebra k K] [Algebra C K]
60     [IsScalarTower k C K]
61     (D : Derivation k C K) (q : Fin (n + 1) → C) (y : Fin n → C)
62     (hq0 : algebraMap C K (q 0) ≠ 0)
63     (hfactor : ∀ i, q i.succ = q 0 * y i) :
64     dehomogenizedTangentColumn (fun i => algebraMap C K (q i))
65       (fun i => D (q i)) = (fun i => D (y i)) := by
66   ext i
67   rw [dehomogenizedTangentColumn_apply, hfactor i, Derivation.leibniz]
68   rw [(algebraMap C K).map_mul]
69   simp only [Algebra.smul_def]
70   field_simp [hq0]
71   ring
72 
73 /-- The affine tangent subspace generated by dehomogenizing the supplied
74 projective tangent columns. -/
75 def dehomogenizedTangentSpan {κ : Type*}
76     (q : Fin (n + 1) → K) (B : Matrix (Fin (n + 1)) κ K) :
77     Submodule K (AffineTangentVector K n) :=
78   Submodule.span K
79     (Set.range fun j ↦ dehomogenizedTangentColumn q (fun i ↦ B i j))
80 
81 /-- A projective row annihilating both the point and every supplied
82 projective tangent column gives an affine coordinate covector annihilating
83 the dehomogenized tangent span. -/
84 theorem coordinateCovector_mem_dehomogenizedTangentSpan_dualAnnihilator
85     {κ : Type*}
86     (q ell : Fin (n + 1) → K) (B : Matrix (Fin (n + 1)) κ K)
87     (hq0 : q 0 ≠ 0)
88     (hq : ∑ i, ell i * q i = 0)
89     (hB : rowMul ell B = 0) :
90     coordinateCovector (fun i ↦ ell i.succ) ∈
91       (dehomogenizedTangentSpan q B).dualAnnihilator := by
92   rw [Submodule.mem_dualAnnihilator]
93   intro v hv
94   rw [dehomogenizedTangentSpan] at hv
95   induction hv using Submodule.span_induction with
96   | mem v hv =>
97     rcases hv with ⟨j, rfl⟩
98     have hqTail : ∑ i : Fin n, ell i.succ * q i.succ = -(ell 0 * q 0) := by
99       rw [Fin.sum_univ_succ] at hq
100       linear_combination hq
101     have hBTail : ∑ i : Fin n, ell i.succ * B i.succ j = -(ell 0 * B 0 j) := by
102       have hj := congrFun hB j
103       simp only [Pi.zero_apply, rowMul, Fin.sum_univ_succ] at hj
104       linear_combination hj
105     simp only [coordinateCovector_apply, dehomogenizedTangentColumn_apply]
106     simp_rw [← mul_div_assoc]
107     rw [← Finset.sum_div]
108     field_simp [hq0]
109     calc
110       (∑ i : Fin n, ell i.succ *
111           (B i.succ j * q 0 - q i.succ * B 0 j)) =
112           (∑ i : Fin n, (ell i.succ * B i.succ j) * q 0) -
113             ∑ i : Fin n, (ell i.succ * q i.succ) * B 0 j := by
114               rw [← Finset.sum_sub_distrib]
115               apply Finset.sum_congr rfl
116               intro i hi
117               ring
118       _ = (∑ i : Fin n, ell i.succ * B i.succ j) * q 0 -
119             (∑ i : Fin n, ell i.succ * q i.succ) * B 0 j := by
120               rw [Finset.sum_mul, Finset.sum_mul]
121       _ = q 0 ^ 2 * 0 := by rw [hBTail, hqTail]; ring
122   | zero => exact map_zero (coordinateCovector (fun i ↦ ell i.succ))
123   | add x y _ _ hx hy =>
124       simpa [hx, hy] using map_add (coordinateCovector (fun i ↦ ell i.succ)) x y
125   | smul a x _ hx =>
126       simp [map_smul, hx]
127 
128 /-- If the dehomogenized column span is the embedded Zariski tangent space,
129 then the tail of the projective annihilating row is an affine conormal
130 covector. -/
131 theorem coordinateCovector_mem_affineConormalSpace_of_projective_row
132     {κ : Type*}
133     (I : Ideal (MvPolynomial (Fin n) K))
134     (q ell : Fin (n + 1) → K) (B : Matrix (Fin (n + 1)) κ K)
135     (hq0 : q 0 ≠ 0)
136     (hq : ∑ i, ell i * q i = 0)
137     (hB : rowMul ell B = 0)
138     (htangent :
139       dehomogenizedTangentSpan q B = zariskiTangentSpace (dehomogenizedPoint q) I) :
140     coordinateCovector (fun i ↦ ell i.succ) ∈
141       affineConormalSpace (dehomogenizedPoint q) I := by
142   rw [affineConormalSpace, ← htangent]
143   exact coordinateCovector_mem_dehomogenizedTangentSpan_dualAnnihilator
144     q ell B hq0 hq hB
145 
146 /-- Projective point and tangent data produce a point of the equation-defined
147 affine conormal locus once base-equation membership and the exact Zariski
148 tangent-space identification are supplied. -/
149 theorem phasePoint_mem_equationConormalLocus_of_projective_row
150     {κ : Type*}
151     (I : Ideal (MvPolynomial (Fin n) K))
152     (q ell : Fin (n + 1) → K) (B : Matrix (Fin (n + 1)) κ K)
153     (hq0 : q 0 ≠ 0)
154     (hq : ∑ i, ell i * q i = 0)
155     (hB : rowMul ell B = 0)
156     (hbase : ∀ f ∈ I, MvPolynomial.eval (dehomogenizedPoint q) f = 0)
157     (htangent :
158       dehomogenizedTangentSpan q B = zariskiTangentSpace (dehomogenizedPoint q) I) :
159     Sum.elim (dehomogenizedPoint q) (fun i ↦ ell i.succ) ∈
160       equationConormalLocus I := by
161   refine ⟨?_, ?_⟩
162   · simpa using hbase
163   · simpa using coordinateCovector_mem_affineConormalSpace_of_projective_row
164       I q ell B hq0 hq hB htangent
165 
166 /-- Jacobian-facing form of the same bridge.  The supplied equations belong
167 to `I`, and the dehomogenized column span is identified exactly with their
168 Jacobian tangent kernel. -/
169 theorem phasePoint_mem_equationConormalLocus_of_projective_row_jacobian
170     {κ ι : Type*}
171     (I : Ideal (MvPolynomial (Fin n) K))
172     (equations : ι → MvPolynomial (Fin n) K)
173     (hequations : ∀ i, equations i ∈ I)
174     (q ell : Fin (n + 1) → K) (B : Matrix (Fin (n + 1)) κ K)
175     (hq0 : q 0 ≠ 0)
176     (hq : ∑ i, ell i * q i = 0)
177     (hB : rowMul ell B = 0)
178     (hbase : ∀ f ∈ I, MvPolynomial.eval (dehomogenizedPoint q) f = 0)
179     (htangent :
180       dehomogenizedTangentSpan q B =
181         jacobianTangentSpace (dehomogenizedPoint q) equations) :
182     Sum.elim (dehomogenizedPoint q) (fun i ↦ ell i.succ) ∈
183       equationConormalLocus I := by
184   refine ⟨?_, ?_⟩
185   · simpa using hbase
186   · apply jacobianConormalSpace_le_affineConormalSpace
187       (dehomogenizedPoint q) I equations hequations
188     change coordinateCovector (fun i ↦ ell i.succ) ∈
189       (jacobianTangentSpace (dehomogenizedPoint q) equations).dualAnnihilator
190     rw [← htangent]
191     exact coordinateCovector_mem_dehomogenizedTangentSpan_dualAnnihilator
192       q ell B hq0 hq hB
193 
194 #print axioms coordinateCovector_mem_dehomogenizedTangentSpan_dualAnnihilator
195 #print axioms coordinateCovector_mem_affineConormalSpace_of_projective_row
196 #print axioms phasePoint_mem_equationConormalLocus_of_projective_row
197 #print axioms phasePoint_mem_equationConormalLocus_of_projective_row_jacobian
198 
199 end
200 
201 end Stafford38.Geometry.ProjectiveConormalDehomogenization
202