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.LinearAlgebra.Symplectic.BigCell |
| 2 | import OAI.RepresentationTheory.Weil.Local.Generators |
| 3 | |
| 4 | /-! # Generation Symplectic -/ |
| 5 | |
| 6 | namespace OAI.RepresentationTheory.Weil.Local.GenerationSymplectic.Construction |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | section |
| 11 | |
| 12 | /-! Symplectic generator reduction over a field. The big-cell argument follows |
| 13 | the same matrix calculation as PoissonAutomorphy, with the field parameter left general. -/ |
| 14 | |
| 15 | open _root_.Matrix |
| 16 | |
| 17 | variable {k : Type} [Field k] {n : ℕ} |
| 18 | |
| 19 | def upperSymplectic (B : FunctionsMetaplectic.Construction.SymmetricMatrix k n) : FunctionsMetaplectic.Construction.Symplectic k n := by |
| 20 | refine ⟨Matrix.fromBlocks 1 B.val 0 1, ?_⟩ |
| 21 | rw [SymplecticGroup.fromBlocks_mem_iff] |
| 22 | simp [B.property.eq] |
| 23 | |
| 24 | theorem quadratic_upper_conjugation (B : FunctionsMetaplectic.Construction.SymmetricMatrix k n) : |
| 25 | Generators.Construction.quadraticSymplectic B = Generators.Construction.weylSymplectic k n * |
| 26 | upperSymplectic ⟨-B.val, B.property.neg⟩ * (Generators.Construction.weylSymplectic k n)⁻¹ := by |
| 27 | apply Subtype.ext |
| 28 | change Matrix.fromBlocks 1 0 B.val 1 = |
| 29 | (Generators.Construction.weylSymplectic k n).val * (upperSymplectic ⟨-B.val, B.property.neg⟩).val * |
| 30 | ((Generators.Construction.weylSymplectic k n)⁻¹).val |
| 31 | rw [SymplecticGroup.coe_inv] |
| 32 | simp [Generators.Construction.weylSymplectic, upperSymplectic, Matrix.J, Matrix.fromBlocks_multiply, |
| 33 | Matrix.fromBlocks_transpose, Matrix.fromBlocks_neg] |
| 34 | |
| 35 | /-- Uses the kernel-checked big-cell lemma in the Mathlib. |
| 36 | Its private visibility does not change its proof or axiom dependencies. -/ |
| 37 | theorem symplectic_exists_upper_bigCell (g : FunctionsMetaplectic.Construction.Symplectic k n) : |
| 38 | ∃ B : FunctionsMetaplectic.Construction.SymmetricMatrix k n, |
| 39 | IsUnit ((upperSymplectic B * g).val.toBlocks₁₁).det := by |
| 40 | have hex : ∃ B : Matrix (Fin n) (Fin n) k, B.IsSymm ∧ |
| 41 | IsUnit (g.val.toBlocks₁₁ + B * g.val.toBlocks₂₁).det := by |
| 42 | apply LinearAlgebra.Symplectic.BigCell.SymplecticBigCell.exists_symmetric_X_isUnit_det_add_mul_of_symplectic |
| 43 | exact (show Matrix.fromBlocks g.val.toBlocks₁₁ g.val.toBlocks₁₂ |
| 44 | g.val.toBlocks₂₁ g.val.toBlocks₂₂ ∈ Matrix.symplecticGroup (Fin n) k from by |
| 45 | simpa only [Matrix.fromBlocks_toBlocks] using g.property) |
| 46 | obtain ⟨B, hB, hdet⟩ := hex |
| 47 | refine ⟨⟨B, hB⟩, ?_⟩ |
| 48 | change IsUnit (((upperSymplectic ⟨B, hB⟩).val * g.val).toBlocks₁₁).det |
| 49 | rw [← Matrix.fromBlocks_toBlocks g.val] |
| 50 | simpa [upperSymplectic, Matrix.fromBlocks_multiply] using hdet |
| 51 | |
| 52 | theorem symplectic_bigCell_parameters_symmetric (A : FunctionsMetaplectic.Construction.GeneralLinear k n) |
| 53 | (B C D : Matrix (Fin n) (Fin n) k) |
| 54 | (hg : Matrix.fromBlocks A.val B C D ∈ Matrix.symplecticGroup (Fin n) k) : |
| 55 | (C * (A⁻¹).val).IsSymm ∧ ((A⁻¹).val * B).IsSymm := by |
| 56 | have hac := (SymplecticGroup.fromBlocks_mem_iff.mp hg).1 |
| 57 | have hab := (SymplecticGroup.fromBlocks_mem_iff.mp |
| 58 | (show Matrix.fromBlocks A.val.transpose C.transpose B.transpose D.transpose ∈ |
| 59 | Matrix.symplecticGroup (Fin n) k from by |
| 60 | simpa only [Matrix.fromBlocks_transpose] using SymplecticGroup.transpose_mem hg)).1 |
| 61 | simp only [Matrix.transpose_transpose] at hab |
| 62 | constructor |
| 63 | · change (C * (A⁻¹).val).transpose = C * (A⁻¹).val |
| 64 | have h := congrArg (fun M => (A⁻¹).val.transpose * M * (A⁻¹).val) hac |
| 65 | simp only [← Matrix.mul_assoc, ← Matrix.transpose_mul, ← Units.val_mul, |
| 66 | mul_inv_cancel, Units.val_one, Matrix.transpose_one, one_mul] at h |
| 67 | simpa only [Matrix.transpose_mul, Matrix.mul_assoc, ← Units.val_mul, |
| 68 | mul_inv_cancel, Units.val_one, mul_one] using h.symm |
| 69 | · change ((A⁻¹).val * B).transpose = (A⁻¹).val * B |
| 70 | have h := congrArg (fun M => (A⁻¹).val * M * (A⁻¹).val.transpose) hab |
| 71 | simp only [← Matrix.mul_assoc, ← Units.val_mul, inv_mul_cancel, Units.val_one, |
| 72 | one_mul] at h |
| 73 | simpa only [Matrix.transpose_mul, Matrix.mul_assoc, ← Matrix.transpose_mul, |
| 74 | ← Units.val_mul, inv_mul_cancel, Units.val_one, Matrix.transpose_one, |
| 75 | mul_one] using h |
| 76 | |
| 77 | theorem symplectic_bigCell_factorization (A : FunctionsMetaplectic.Construction.GeneralLinear k n) |
| 78 | (B C D : Matrix (Fin n) (Fin n) k) |
| 79 | (hg : Matrix.fromBlocks A.val B C D ∈ Matrix.symplecticGroup (Fin n) k) : |
| 80 | (⟨Matrix.fromBlocks A.val B C D, hg⟩ : FunctionsMetaplectic.Construction.Symplectic k n) = |
| 81 | Generators.Construction.quadraticSymplectic ⟨C * (A⁻¹).val, (symplectic_bigCell_parameters_symmetric A B C D hg).1⟩ * |
| 82 | Generators.Construction.leviSymplectic A * |
| 83 | upperSymplectic ⟨(A⁻¹).val * B, (symplectic_bigCell_parameters_symmetric A B C D hg).2⟩ := by |
| 84 | have hL := (symplectic_bigCell_parameters_symmetric A B C D hg).1 |
| 85 | have had := (SymplecticGroup.fromBlocks_mem_iff.mp hg).2.2 |
| 86 | have hD : D = C * (A⁻¹).val * B + (A⁻¹).val.transpose := by |
| 87 | have h := congrArg (fun M => (A⁻¹).val.transpose * M) had |
| 88 | simp only [Matrix.mul_sub, ← Matrix.mul_assoc, ← Matrix.transpose_mul, |
| 89 | ← Units.val_mul, mul_inv_cancel, Units.val_one, Matrix.transpose_one, |
| 90 | one_mul, mul_one] at h |
| 91 | rw [hL.eq] at h |
| 92 | exact (sub_eq_iff_eq_add.mp h).trans (add_comm _ _) |
| 93 | apply Subtype.ext |
| 94 | change Matrix.fromBlocks A.val B C D = |
| 95 | Matrix.fromBlocks 1 0 (C * (A⁻¹).val) 1 * |
| 96 | Matrix.fromBlocks A.val 0 0 (A⁻¹).val.transpose * |
| 97 | Matrix.fromBlocks 1 ((A⁻¹).val * B) 0 1 |
| 98 | simp only [Matrix.fromBlocks_multiply, one_mul, mul_one, zero_mul, mul_zero, |
| 99 | zero_add, add_zero] |
| 100 | have hC : C * (A⁻¹).val * A.val = C := by |
| 101 | rw [Matrix.mul_assoc, ← Units.val_mul, inv_mul_cancel, Units.val_one, mul_one] |
| 102 | have hB : A.val * ((A⁻¹).val * B) = B := by |
| 103 | rw [← Matrix.mul_assoc, ← Units.val_mul, mul_inv_cancel, Units.val_one, one_mul] |
| 104 | rw [hC, hB, hD, Matrix.mul_assoc C (A⁻¹).val B] |
| 105 | |
| 106 | theorem subgroup_eq_top_of_symplectic_generators (H : Subgroup (FunctionsMetaplectic.Construction.Symplectic k n)) |
| 107 | (hU : ∀ B : FunctionsMetaplectic.Construction.SymmetricMatrix k n, upperSymplectic B ∈ H) |
| 108 | (hM : ∀ A : FunctionsMetaplectic.Construction.GeneralLinear k n, Generators.Construction.leviSymplectic A ∈ H) |
| 109 | (hW : Generators.Construction.weylSymplectic k n ∈ H) : H = ⊤ := by |
| 110 | apply top_unique |
| 111 | intro g _ |
| 112 | have hL : ∀ B : FunctionsMetaplectic.Construction.SymmetricMatrix k n, Generators.Construction.quadraticSymplectic B ∈ H := by |
| 113 | intro B |
| 114 | rw [quadratic_upper_conjugation] |
| 115 | exact H.mul_mem (H.mul_mem hW (hU ⟨-B.val, B.property.neg⟩)) (H.inv_mem hW) |
| 116 | obtain ⟨X, hdet⟩ := symplectic_exists_upper_bigCell g |
| 117 | let f := upperSymplectic X * g |
| 118 | obtain ⟨A, hA⟩ := (Matrix.isUnit_iff_isUnit_det f.val.toBlocks₁₁).mpr hdet |
| 119 | have hmatrix : Matrix.fromBlocks A.val f.val.toBlocks₁₂ |
| 120 | f.val.toBlocks₂₁ f.val.toBlocks₂₂ = f.val := by |
| 121 | rw [hA, Matrix.fromBlocks_toBlocks] |
| 122 | have hs : Matrix.fromBlocks A.val f.val.toBlocks₁₂ f.val.toBlocks₂₁ |
| 123 | f.val.toBlocks₂₂ ∈ Matrix.symplecticGroup (Fin n) k := by |
| 124 | rw [hmatrix] |
| 125 | exact f.property |
| 126 | have hfactor := symplectic_bigCell_factorization A f.val.toBlocks₁₂ |
| 127 | f.val.toBlocks₂₁ f.val.toBlocks₂₂ hs |
| 128 | have hf : f ∈ H := by |
| 129 | have heq : f = ⟨Matrix.fromBlocks A.val f.val.toBlocks₁₂ |
| 130 | f.val.toBlocks₂₁ f.val.toBlocks₂₂, hs⟩ := Subtype.ext hmatrix.symm |
| 131 | rw [heq, hfactor] |
| 132 | exact H.mul_mem (H.mul_mem (hL _) (hM A)) (hU _) |
| 133 | have h := H.mul_mem (H.inv_mem (hU X)) hf |
| 134 | simpa only [f, inv_mul_cancel_left] using h |
| 135 | |
| 136 | end |
| 137 | |
| 138 | section |
| 139 | |
| 140 | /-! Invertible matrices are generated by invertible symmetric matrices. -/ |
| 141 | |
| 142 | open _root_.Matrix |
| 143 | |
| 144 | variable {k : Type} [Field k] {n : ℕ} |
| 145 | |
| 146 | def swapGeneralLinear (i j : Fin n) : FunctionsMetaplectic.Construction.GeneralLinear k n where |
| 147 | val := (Equiv.swap i j).permMatrix k |
| 148 | inv := (Equiv.swap i j).permMatrix k |
| 149 | val_inv := by rw [← Matrix.permMatrix_mul]; simp |
| 150 | inv_val := by rw [← Matrix.permMatrix_mul]; simp |
| 151 | |
| 152 | theorem swapGeneralLinear_symmetric (i j : Fin n) : |
| 153 | ((swapGeneralLinear (k := k) i j).val).IsSymm := by |
| 154 | change ((Equiv.swap i j).permMatrix k).transpose = (Equiv.swap i j).permMatrix k |
| 155 | rw [Matrix.transpose_permMatrix] |
| 156 | simp |
| 157 | |
| 158 | theorem swapGeneralLinear_square (i j : Fin n) : |
| 159 | swapGeneralLinear (k := k) i j * swapGeneralLinear i j = 1 := by |
| 160 | apply Units.ext |
| 161 | change (Equiv.swap i j).permMatrix k * (Equiv.swap i j).permMatrix k = 1 |
| 162 | rw [← Matrix.permMatrix_mul] |
| 163 | simp |
| 164 | |
| 165 | theorem transvection_mul_swap (t : Matrix.TransvectionStruct (Fin n) k) : |
| 166 | t.toMatrix * (swapGeneralLinear t.i t.j).val = |
| 167 | (swapGeneralLinear t.i t.j).val + Matrix.single t.i t.i t.c := by |
| 168 | rw [TransvectionStruct.toMatrix, Matrix.transvection, Matrix.add_mul, Matrix.one_mul] |
| 169 | congr 1 |
| 170 | ext a b |
| 171 | by_cases ha : a = t.i |
| 172 | · subst a |
| 173 | rw [Matrix.single_mul_apply_same] |
| 174 | simp [swapGeneralLinear, PEquiv.toMatrix, Equiv.toPEquiv_apply, Matrix.single] |
| 175 | · rw [Matrix.single_mul_apply_of_ne t.c t.i t.j a b ha] |
| 176 | simp [Matrix.single, Ne.symm ha] |
| 177 | |
| 178 | theorem transvection_mul_swap_symmetric (t : Matrix.TransvectionStruct (Fin n) k) : |
| 179 | (t.toMatrix * (swapGeneralLinear t.i t.j).val).IsSymm := by |
| 180 | rw [transvection_mul_swap] |
| 181 | apply (swapGeneralLinear_symmetric t.i t.j).add |
| 182 | change (Matrix.single t.i t.i t.c).transpose = Matrix.single t.i t.i t.c |
| 183 | simp |
| 184 | |
| 185 | theorem subgroup_eq_top_of_symmetric_generalLinear (H : Subgroup (FunctionsMetaplectic.Construction.GeneralLinear k n)) |
| 186 | (hSym : ∀ A : FunctionsMetaplectic.Construction.GeneralLinear k n, A.val.IsSymm → A ∈ H) : H = ⊤ := by |
| 187 | apply top_unique |
| 188 | intro U _ |
| 189 | have hp : ∀ M : Matrix (Fin n) (Fin n) k, M.det ≠ 0 → |
| 190 | ∀ A : FunctionsMetaplectic.Construction.GeneralLinear k n, A.val = M → A ∈ H := by |
| 191 | intro M hM |
| 192 | apply Matrix.diagonal_transvection_induction_of_det_ne_zero |
| 193 | (fun M => ∀ A : FunctionsMetaplectic.Construction.GeneralLinear k n, A.val = M → A ∈ H) M hM |
| 194 | · intro D _ A hA |
| 195 | apply hSym A |
| 196 | rw [hA] |
| 197 | exact Matrix.isSymm_diagonal D |
| 198 | · intro t A hA |
| 199 | have hAP : A * swapGeneralLinear t.i t.j ∈ H := by |
| 200 | apply hSym |
| 201 | change (A.val * (swapGeneralLinear t.i t.j).val).IsSymm |
| 202 | rw [hA] |
| 203 | exact transvection_mul_swap_symmetric t |
| 204 | have hP : swapGeneralLinear (k := k) t.i t.j ∈ H := |
| 205 | hSym _ (swapGeneralLinear_symmetric t.i t.j) |
| 206 | have h := H.mul_mem hAP hP |
| 207 | rwa [mul_assoc, swapGeneralLinear_square, mul_one] at h |
| 208 | · intro M N hM hN ihM ihN A hA |
| 209 | obtain ⟨B, hB⟩ := (Matrix.isUnit_iff_isUnit_det M).mpr (isUnit_iff_ne_zero.mpr hM) |
| 210 | obtain ⟨C, hC⟩ := (Matrix.isUnit_iff_isUnit_det N).mpr (isUnit_iff_ne_zero.mpr hN) |
| 211 | have heq : A = B * C := by |
| 212 | apply Units.ext |
| 213 | rw [hA, Units.val_mul, hB, hC] |
| 214 | rw [heq] |
| 215 | exact H.mul_mem (ihM B hB) (ihN C hC) |
| 216 | exact hp U.val ((Matrix.isUnit_iff_isUnit_det U.val).mp U.isUnit).ne_zero U rfl |
| 217 | |
| 218 | end |
| 219 | |
| 220 | /-! Upper and lower symmetric unipotents generate the symplectic group. -/ |
| 221 | |
| 222 | open _root_.Matrix |
| 223 | |
| 224 | variable {k : Type} [Field k] {n : ℕ} |
| 225 | |
| 226 | def leviHom : FunctionsMetaplectic.Construction.GeneralLinear k n →* FunctionsMetaplectic.Construction.Symplectic k n where |
| 227 | toFun := Generators.Construction.leviSymplectic |
| 228 | map_one' := by |
| 229 | apply Subtype.ext |
| 230 | simp [Generators.Construction.leviSymplectic] |
| 231 | map_mul' A B := by |
| 232 | apply Subtype.ext |
| 233 | change (Generators.Construction.leviSymplectic (A * B)).val = (Generators.Construction.leviSymplectic A).val * (Generators.Construction.leviSymplectic B).val |
| 234 | simp [Generators.Construction.leviSymplectic, _root_.mul_inv_rev, Matrix.transpose_mul, Matrix.fromBlocks_multiply] |
| 235 | |
| 236 | theorem weyl_unipotent_factorization : |
| 237 | Generators.Construction.weylSymplectic k n = upperSymplectic ⟨1, Matrix.isSymm_one⟩ * |
| 238 | Generators.Construction.quadraticSymplectic ⟨-1, Matrix.isSymm_one.neg⟩ * upperSymplectic ⟨1, Matrix.isSymm_one⟩ := by |
| 239 | apply Subtype.ext |
| 240 | change (Generators.Construction.weylSymplectic k n).val = |
| 241 | (upperSymplectic ⟨1, Matrix.isSymm_one⟩).val * |
| 242 | (Generators.Construction.quadraticSymplectic ⟨-1, Matrix.isSymm_one.neg⟩).val * |
| 243 | (upperSymplectic ⟨1, Matrix.isSymm_one⟩).val |
| 244 | simp [Generators.Construction.weylSymplectic, upperSymplectic, Generators.Construction.quadraticSymplectic, Matrix.fromBlocks_multiply] |
| 245 | |
| 246 | theorem symmetric_levi_unipotent_factorization (A : FunctionsMetaplectic.Construction.GeneralLinear k n) (hA : A.val.IsSymm) : |
| 247 | Generators.Construction.leviSymplectic A * Generators.Construction.weylSymplectic k n = |
| 248 | upperSymplectic ⟨A.val, hA⟩ * |
| 249 | Generators.Construction.quadraticSymplectic ⟨-(A⁻¹).val, (by |
| 250 | have h : ((A⁻¹).val).IsSymm := by simpa only [Matrix.coe_units_inv] using hA.inv |
| 251 | exact h.neg)⟩ * upperSymplectic ⟨A.val, hA⟩ := by |
| 252 | have hinv : ((A⁻¹).val).IsSymm := by simpa only [Matrix.coe_units_inv] using hA.inv |
| 253 | apply Subtype.ext |
| 254 | change (Generators.Construction.leviSymplectic A).val * (Generators.Construction.weylSymplectic k n).val = |
| 255 | (upperSymplectic ⟨A.val, hA⟩).val * |
| 256 | (Generators.Construction.quadraticSymplectic ⟨-(A⁻¹).val, hinv.neg⟩).val * (upperSymplectic ⟨A.val, hA⟩).val |
| 257 | simp [Generators.Construction.leviSymplectic, Generators.Construction.weylSymplectic, upperSymplectic, Generators.Construction.quadraticSymplectic, |
| 258 | Matrix.fromBlocks_multiply, hA.inv.eq] |
| 259 | |
| 260 | theorem subgroup_eq_top_of_symplectic_unipotents (H : Subgroup (FunctionsMetaplectic.Construction.Symplectic k n)) |
| 261 | (hU : ∀ B : FunctionsMetaplectic.Construction.SymmetricMatrix k n, upperSymplectic B ∈ H) |
| 262 | (hL : ∀ B : FunctionsMetaplectic.Construction.SymmetricMatrix k n, Generators.Construction.quadraticSymplectic B ∈ H) : H = ⊤ := by |
| 263 | have hW : Generators.Construction.weylSymplectic k n ∈ H := by |
| 264 | rw [weyl_unipotent_factorization] |
| 265 | exact H.mul_mem (H.mul_mem (hU _) (hL _)) (hU _) |
| 266 | have hSym (A : FunctionsMetaplectic.Construction.GeneralLinear k n) (hA : A.val.IsSymm) : Generators.Construction.leviSymplectic A ∈ H := by |
| 267 | have h : Generators.Construction.leviSymplectic A * Generators.Construction.weylSymplectic k n ∈ H := by |
| 268 | rw [symmetric_levi_unipotent_factorization A hA] |
| 269 | exact H.mul_mem (H.mul_mem (hU _) (hL _)) (hU _) |
| 270 | have hh := H.mul_mem h (H.inv_mem hW) |
| 271 | simpa only [mul_inv_cancel_right] using hh |
| 272 | have htop : H.comap (leviHom (k := k) (n := n)) = ⊤ := |
| 273 | subgroup_eq_top_of_symmetric_generalLinear _ hSym |
| 274 | apply subgroup_eq_top_of_symplectic_generators H hU _ hW |
| 275 | intro A |
| 276 | have h : A ∈ H.comap (leviHom (k := k) (n := n)) := by rw [htop]; trivial |
| 277 | exact h |
| 278 | |
| 279 | end |
| 280 | |
| 281 | end OAI.RepresentationTheory.Weil.Local.GenerationSymplectic.Construction |