Hodge conjecture: the CM case in Lean, read and discussed
OpenAI's Lean proof of the Hodge conjecture for CM abelian varieties: rerun it, read its statement, and keep the open questions with their sources. The conjecture is open

| 1 | import OAI.AlgebraicGeometry.PELModuli.CMPoints.RationalNegativeLine |
| 2 | import Mathlib.LinearAlgebra.QuadraticForm.Basic |
| 3 | |
| 4 | /-! # Hermitian Diagonalization -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.PELModuli.CMPoints.HermitianDiagonalization |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | section |
| 11 | |
| 12 | /-! Orthogonal diagonalization with a prescribed first vector. Only |
| 13 | linearity in the first argument, symmetric orthogonality, and anisotropy |
| 14 | are used; in particular this applies to Hermitian forms. -/ |
| 15 | |
| 16 | open scoped Classical |
| 17 | open _root_.Module |
| 18 | |
| 19 | variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] |
| 20 | |
| 21 | def orthogonalFunctional (B : V →ₗ[K] (V → K)) (x : V) : V →ₗ[K] K := |
| 22 | (LinearMap.proj x).comp B |
| 23 | |
| 24 | theorem span_isCompl_orthogonalFunctional (B : V →ₗ[K] (V → K)) |
| 25 | (x : V) (hx : B x x ≠ 0) : |
| 26 | IsCompl (K ∙ x) (orthogonalFunctional B x).ker := by |
| 27 | constructor |
| 28 | · rw [Submodule.disjoint_def] |
| 29 | intro y hy hy' |
| 30 | obtain ⟨a, rfl⟩ := Submodule.mem_span_singleton.mp hy |
| 31 | have ha : a * B x x = 0 := by |
| 32 | simpa [orthogonalFunctional] using hy' |
| 33 | rw [(mul_eq_zero.mp ha).resolve_right hx, zero_smul] |
| 34 | · exact codisjoint_iff.mpr |
| 35 | (LinearMap.span_singleton_sup_ker_eq_top (orthogonalFunctional B x) hx) |
| 36 | |
| 37 | def restrictFirstOrthogonal (B : V →ₗ[K] (V → K)) (x : V) : |
| 38 | (orthogonalFunctional B x).ker →ₗ[K] ((orthogonalFunctional B x).ker → K) where |
| 39 | toFun y z := B y.val z.val |
| 40 | map_add' y z := by ext t; exact congrFun (B.map_add y.val z.val) t.val |
| 41 | map_smul' a y := by ext t; exact congrFun (B.map_smul a y.val) t.val |
| 42 | |
| 43 | def extendOrthogonalBasis (B : V →ₗ[K] (V → K)) (x : V) (hx : B x x ≠ 0) |
| 44 | {n : ℕ} (b : Basis (Fin n) K (orthogonalFunctional B x).ker) : |
| 45 | Basis (Fin (n + 1)) K V := |
| 46 | Basis.mkFinCons x b |
| 47 | (by |
| 48 | intro a y hy heq |
| 49 | have he : a * B x x = 0 := by |
| 50 | have h := congrArg (orthogonalFunctional B x) heq |
| 51 | simpa [orthogonalFunctional, show B y x = 0 from hy] using h |
| 52 | exact (mul_eq_zero.mp he).resolve_right hx) |
| 53 | (by |
| 54 | intro y |
| 55 | refine ⟨-B y x / B x x, ?_⟩ |
| 56 | change B (y + (-B y x / B x x) • x) x = 0 |
| 57 | simp [div_mul_cancel₀ _ hx]) |
| 58 | |
| 59 | theorem extendOrthogonalBasis_zero (B : V →ₗ[K] (V → K)) (x : V) |
| 60 | (hx : B x x ≠ 0) {n : ℕ} |
| 61 | (b : Basis (Fin n) K (orthogonalFunctional B x).ker) : |
| 62 | extendOrthogonalBasis B x hx b 0 = x := by |
| 63 | rw [extendOrthogonalBasis, Basis.coe_mkFinCons] |
| 64 | rfl |
| 65 | |
| 66 | theorem extendOrthogonalBasis_orthogonal (B : V →ₗ[K] (V → K)) (x : V) |
| 67 | (hx : B x x ≠ 0) (hsym : ∀ y z, B y z = 0 ↔ B z y = 0) |
| 68 | {n : ℕ} (b : Basis (Fin n) K (orthogonalFunctional B x).ker) |
| 69 | (hb : Pairwise (fun i j => B (b i).val (b j).val = 0)) : |
| 70 | Pairwise (fun i j => |
| 71 | B (extendOrthogonalBasis B x hx b i) (extendOrthogonalBasis B x hx b j) = 0) := by |
| 72 | rw [extendOrthogonalBasis, Basis.coe_mkFinCons] |
| 73 | intro i j |
| 74 | refine Fin.cases ?_ (fun i => ?_) i <;> |
| 75 | refine Fin.cases ?_ (fun j => ?_) j <;> intro hij |
| 76 | · exact (hij rfl).elim |
| 77 | · exact (hsym _ _).mpr (b j).prop |
| 78 | · exact (b i).prop |
| 79 | · exact hb (ne_of_apply_ne Fin.succ hij) |
| 80 | |
| 81 | theorem exists_anisotropic_orthogonal_basis [FiniteDimensional K V] |
| 82 | (B : V →ₗ[K] (V → K)) |
| 83 | (hsym : ∀ x y, B x y = 0 ↔ B y x = 0) |
| 84 | (hani : ∀ x, B x x = 0 → x = 0) : |
| 85 | ∃ b : Basis (Fin (finrank K V)) K V, |
| 86 | Pairwise (fun i j => B (b i) (b j) = 0) := by |
| 87 | suffices ∀ d, finrank K V = d → |
| 88 | ∃ b : Basis (Fin d) K V, Pairwise (fun i j => B (b i) (b j) = 0) by |
| 89 | exact this _ rfl |
| 90 | intro d hd |
| 91 | induction d generalizing V with |
| 92 | | zero => |
| 93 | refine ⟨basisOfFinrankZero hd, ?_⟩ |
| 94 | intro i |
| 95 | exact Fin.elim0 i |
| 96 | | succ d ih => |
| 97 | let i : Fin (finrank K V) := ⟨0, by omega⟩ |
| 98 | let x : V := Module.finBasis K V i |
| 99 | have hx0 : x ≠ 0 := (Module.finBasis K V).ne_zero i |
| 100 | have hx : B x x ≠ 0 := fun h => hx0 (hani x h) |
| 101 | have hd' : finrank K (orthogonalFunctional B x).ker = d := by |
| 102 | have heq := Submodule.finrank_add_eq_of_isCompl |
| 103 | (span_isCompl_orthogonalFunctional B x hx).symm |
| 104 | rw [finrank_span_singleton hx0, hd] at heq |
| 105 | omega |
| 106 | obtain ⟨b, hb⟩ := ih (V := (orthogonalFunctional B x).ker) |
| 107 | (restrictFirstOrthogonal B x) |
| 108 | (fun y z => hsym y.val z.val) |
| 109 | (fun y hy => Subtype.ext (hani y.val hy)) hd' |
| 110 | exact ⟨extendOrthogonalBasis B x hx b, |
| 111 | extendOrthogonalBasis_orthogonal B x hx hsym b hb⟩ |
| 112 | |
| 113 | theorem exists_anisotropic_orthogonal_basis_with_first [FiniteDimensional K V] |
| 114 | (B : V →ₗ[K] (V → K)) |
| 115 | (hsym : ∀ x y, B x y = 0 ↔ B y x = 0) |
| 116 | (hani : ∀ x, B x x = 0 → x = 0) |
| 117 | (x : V) (hx0 : x ≠ 0) (n : ℕ) (hd : finrank K V = n + 1) : |
| 118 | ∃ b : Basis (Fin (n + 1)) K V, b 0 = x ∧ |
| 119 | Pairwise (fun i j => B (b i) (b j) = 0) := by |
| 120 | have hx : B x x ≠ 0 := fun h => hx0 (hani x h) |
| 121 | have hd' : finrank K (orthogonalFunctional B x).ker = n := by |
| 122 | have heq := Submodule.finrank_add_eq_of_isCompl |
| 123 | (span_isCompl_orthogonalFunctional B x hx).symm |
| 124 | rw [finrank_span_singleton hx0, hd] at heq |
| 125 | omega |
| 126 | obtain ⟨b, hb⟩ := exists_anisotropic_orthogonal_basis |
| 127 | (restrictFirstOrthogonal B x) |
| 128 | (fun y z => hsym y.val z.val) |
| 129 | (fun y hy => Subtype.ext (hani y.val hy)) |
| 130 | subst n |
| 131 | exact ⟨extendOrthogonalBasis B x hx b, |
| 132 | extendOrthogonalBasis_zero B x hx b, |
| 133 | extendOrthogonalBasis_orthogonal B x hx hsym b hb⟩ |
| 134 | |
| 135 | end |
| 136 | |
| 137 | /-! Every anisotropic rational Hermitian ball has an orthogonal rational |
| 138 | basis whose first line is negative at the distinguished embedding. -/ |
| 139 | |
| 140 | open scoped Classical |
| 141 | |
| 142 | open _root_.Module |
| 143 | |
| 144 | variable {E : Type} [Field E] [NumberField E] [Algebra ℚ E] |
| 145 | [NumberField.IsCMField E] |
| 146 | |
| 147 | def matrixHermitianFirstLinear (H : Matrix (Fin 3) (Fin 3) E) : |
| 148 | (Fin 3 → E) →ₗ[E] ((Fin 3 → E) → E) where |
| 149 | toFun := AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H |
| 150 | map_add' x y := by |
| 151 | ext z |
| 152 | simp [AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian, add_mul, Finset.sum_add_distrib] |
| 153 | map_smul' a x := by |
| 154 | ext y |
| 155 | simp [AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian, Finset.mul_sum, mul_assoc] |
| 156 | |
| 157 | omit [Algebra ℚ E] in |
| 158 | theorem matrixHermitian_conjugate_swap (H : Matrix (Fin 3) (Fin 3) E) |
| 159 | (hH : ∀ i j, H i j = NumberField.IsCMField.complexConj E (H j i)) |
| 160 | (x y : Fin 3 → E) : |
| 161 | AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H x y = |
| 162 | NumberField.IsCMField.complexConj E (AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H y x) := by |
| 163 | simp only [AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian, map_sum, map_mul, |
| 164 | NumberField.IsCMField.complexConj_apply_apply] |
| 165 | rw [Finset.sum_comm] |
| 166 | apply Finset.sum_congr rfl |
| 167 | intro j _ |
| 168 | apply Finset.sum_congr rfl |
| 169 | intro i _ |
| 170 | rw [← hH i j] |
| 171 | ring |
| 172 | |
| 173 | omit [Algebra ℚ E] in |
| 174 | theorem matrixHermitian_orthogonal_symm (H : Matrix (Fin 3) (Fin 3) E) |
| 175 | (hH : ∀ i j, H i j = NumberField.IsCMField.complexConj E (H j i)) |
| 176 | (x y : Fin 3 → E) : |
| 177 | AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H x y = 0 ↔ AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H y x = 0 := by |
| 178 | rw [matrixHermitian_conjugate_swap H hH x y] |
| 179 | exact map_eq_zero (NumberField.IsCMField.complexConj E) |
| 180 | |
| 181 | theorem exists_rational_orthogonal_negative_basis |
| 182 | (σ : E →ₐ[ℚ] ℂ) (H : Matrix (Fin 3) (Fin 3) E) |
| 183 | (hH : ∀ i j, H i j = NumberField.IsCMField.complexConj E (H j i)) |
| 184 | (hani : ∀ x : Fin 3 → E, AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H x x = 0 → x = 0) |
| 185 | (w : Fin 3 → ℂ) (hw : (AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.complexMatrixHermitian σ.toRingHom H w w).re < 0) : |
| 186 | ∃ b : Basis (Fin 3) E (Fin 3 → E), |
| 187 | Pairwise (fun i j => AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H (b i) (b j) = 0) ∧ |
| 188 | (AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.complexMatrixHermitian σ.toRingHom H |
| 189 | (fun i => σ (b 0 i)) (fun i => σ (b 0 i))).re < 0 := by |
| 190 | obtain ⟨v, hv0, hv⟩ := RationalNegativeLine.exists_rational_negative_vector σ H w hw |
| 191 | obtain ⟨b, hb, ho⟩ := exists_anisotropic_orthogonal_basis_with_first |
| 192 | (matrixHermitianFirstLinear H) |
| 193 | (matrixHermitian_orthogonal_symm H hH) hani v hv0 2 (by simp) |
| 194 | exact ⟨b, ho, by simpa [hb] using hv⟩ |
| 195 | |
| 196 | theorem matrixHermitian_embedding (σ : E →ₐ[ℚ] ℂ) |
| 197 | (H : Matrix (Fin 3) (Fin 3) E) (x y : Fin 3 → E) : |
| 198 | σ (AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H x y) = |
| 199 | AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.complexMatrixHermitian σ.toRingHom H (fun i => σ (x i)) (fun i => σ (y i)) := by |
| 200 | have hc (z : E) : σ (NumberField.IsCMField.complexConj E z) = star (σ z) := |
| 201 | NumberField.IsCMField.complexEmbedding_complexConj E σ.toRingHom z |
| 202 | simp [AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian, AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.complexMatrixHermitian, hc] |
| 203 | |
| 204 | omit [Algebra ℚ E] in |
| 205 | theorem matrixHermitian_diagonal_fixed (H : Matrix (Fin 3) (Fin 3) E) |
| 206 | (hH : ∀ i j, H i j = NumberField.IsCMField.complexConj E (H j i)) |
| 207 | (x : Fin 3 → E) : |
| 208 | NumberField.IsCMField.complexConj E (AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H x x) = |
| 209 | AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H x x := |
| 210 | (matrixHermitian_conjugate_swap H hH x x).symm |
| 211 | |
| 212 | omit [Algebra ℚ E] in |
| 213 | theorem matrixHermitian_diagonal_ne_zero (H : Matrix (Fin 3) (Fin 3) E) |
| 214 | (hani : ∀ x : Fin 3 → E, AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H x x = 0 → x = 0) |
| 215 | (b : Basis (Fin 3) E (Fin 3 → E)) (i : Fin 3) : |
| 216 | AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum.matrixHermitian H (b i) (b i) ≠ 0 := |
| 217 | fun h => b.ne_zero i (hani (b i) h) |
| 218 | |
| 219 | end |
| 220 | |
| 221 | end OAI.AlgebraicGeometry.PELModuli.CMPoints.HermitianDiagonalization |