Stafford38/Geometry/PaperCompletedResidueDerivationFrame.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Geometry.PaperResidueDerivationFrame
3 
4 @[expose] public section
5 
6 /-!
7 # Completed columns from residue coordinates
8 
9 This small interface separates the coefficientwise Kähler frame construction
10 from the retained divisor record.  A retained chart consumer supplies only a
11 completed column, its identified residue coordinates, and algebraicity.
12 -/
13 
14 namespace Stafford38.Geometry.PaperCompletedResidueDerivationFrame
15 
16 open Stafford38.GeometryResidueMinorSelection
17 open Stafford38.GeometrySplitTangentMatrix
18 open Stafford38.Geometry.KaehlerVisibleDerivationFrame
19 open Stafford38.Geometry.PaperResidueDerivationFrame
20 
21 universe u v
22 
23 variable {k κ : Type u} [Field k] [Field κ] [Algebra k κ] [CharZero k]
24 
25 set_option maxHeartbeats 4000000
26 set_option synthInstance.maxHeartbeats 400000
27 
28 /-- A residue frame selected on the affine tail of a projective column embeds
29 into the full homogeneous row index without changing its minor. -/
30 theorem tail_residue_frame_embeds_projective_rows
31     {m d : ℕ}
32     (q : Fin (m + 1) → PowerSeries κ)
33     (D : Fin d → Derivation k κ κ)
34     (rows : Fin d ↪ Fin m)
35     (hdual : ∀ i j,
36       D j (PowerSeries.constantCoeff (q (Fin.succ (rows i)))) =
37         if i = j then 1 else 0)
38     (hminor : PowerSeries.constantCoeff
39       (selectedMinor
40         (coefficientwiseTangentMatrix
41           (fun j : Fin m ↦ q (Fin.succ j)) D) rows).det = 1) :
42     ∃ rowsFull : Fin d ↪ Fin (m + 1),
43       (∀ i j, D j (PowerSeries.constantCoeff (q (rowsFull i))) =
44         if i = j then 1 else 0) ∧
45       PowerSeries.constantCoeff
46         (selectedMinor (coefficientwiseTangentMatrix q D) rowsFull).det = 1 := by
47   let rowsFull : Fin d ↪ Fin (m + 1) :=
48     ⟨fun i ↦ Fin.succ (rows i), fun i j hij ↦
49       rows.injective (Fin.succ_injective m hij)⟩
50   refine ⟨rowsFull, ?_, ?_⟩
51   · intro i j
52     change D j (PowerSeries.constantCoeff (q (Fin.succ (rows i)))) = _
53     exact hdual i j
54   · have hmatrix :
55         selectedMinor (coefficientwiseTangentMatrix q D) rowsFull =
56           selectedMinor
57             (coefficientwiseTangentMatrix
58               (fun j : Fin m ↦ q (Fin.succ j)) D) rows := by
59       ext i j
60       rfl
61     rw [hmatrix]
62     exact hminor
63 
64 /-- An abstract completed column with identified residue coordinates admits
65 an actual dual derivation frame and a unit selected coefficientwise minor. -/
66 theorem exists_completed_derivation_frame_of_residue_coordinates
67     {ι : Type v} [Fintype ι]
68     (q : ι → PowerSeries κ) (qbar : ι → κ)
69     (hcoeff : ∀ i, PowerSeries.constantCoeff (q i) = qbar i)
70     (halg : Algebra.IsAlgebraic
71       (IntermediateField.adjoin k (Set.range qbar) : IntermediateField k κ)
72       κ) :
73     ∃ (rows : Fin (Module.finrank κ (Ω[κ⁄k])) ↪ ι)
74       (D : Fin (Module.finrank κ (Ω[κ⁄k])) → Derivation k κ κ),
75       (∀ i j, D j (qbar (rows i)) = if i = j then 1 else 0) ∧
76       PowerSeries.constantCoeff
77         (selectedMinor (coefficientwiseTangentMatrix q D) rows).det = 1 := by
78   have hrange : Set.range (fun i => PowerSeries.constantCoeff (q i)) =
79       Set.range qbar := by
80     congr 1
81     funext i
82     exact hcoeff i
83   have hgenerated : Algebra.IsAlgebraic
84       (IntermediateField.adjoin k
85         (Set.range fun i => PowerSeries.constantCoeff (q i)) :
86           IntermediateField k κ) κ := by
87     rw [hrange]
88     exact halg
89   obtain ⟨rows, D, hdual, hminor⟩ :=
90     exists_coefficientwise_residue_minor_eq_one (k := k) (κ := κ) q hgenerated
91   refine ⟨rows, D, ?_, hminor⟩
92   intro i j
93   rw [← hcoeff (rows i)]
94   exact hdual i j
95 
96 /-- Residue coordinates on the affine tail construct derivation columns and a
97 unit selected minor on the full homogeneous completed projective column. -/
98 theorem exists_projective_derivation_frame_of_residue_coordinates
99     {m : ℕ}
100     (q : Fin (m + 1) → PowerSeries κ) (qbar : Fin m → κ)
101     (hcoeff : ∀ j, PowerSeries.constantCoeff (q (Fin.succ j)) = qbar j)
102     (halg : Algebra.IsAlgebraic
103       (IntermediateField.adjoin k (Set.range qbar) : IntermediateField k κ)
104       κ) :
105     ∃ (rows : Fin (Module.finrank κ (Ω[κ⁄k])) ↪ Fin (m + 1))
106       (D : Fin (Module.finrank κ (Ω[κ⁄k])) → Derivation k κ κ),
107       (∀ i j, D j (PowerSeries.constantCoeff (q (rows i))) =
108         if i = j then 1 else 0) ∧
109       PowerSeries.constantCoeff
110         (selectedMinor (coefficientwiseTangentMatrix q D) rows).det = 1 := by
111   let qtail : Fin m → PowerSeries κ := fun j ↦ q (Fin.succ j)
112   obtain ⟨rows, D, hdual, hminor⟩ :=
113     exists_completed_derivation_frame_of_residue_coordinates
114       qtail qbar hcoeff halg
115   have hdualTail : ∀ i j,
116       D j (PowerSeries.constantCoeff (qtail (rows i))) =
117         if i = j then 1 else 0 := by
118     intro i j
119     rw [hcoeff (rows i)]
120     exact hdual i j
121   obtain ⟨rowsFull, hdualFull, hminorFull⟩ :=
122     tail_residue_frame_embeds_projective_rows q D rows hdualTail
123       (by simpa [qtail] using hminor)
124   exact ⟨rowsFull, D, hdualFull, hminorFull⟩
125 
126 end Stafford38.Geometry.PaperCompletedResidueDerivationFrame
127