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.RepresentationTheory.Weil.Local.SiegelGaussian |
| 2 | import OAI.RepresentationTheory.Weil.Local.DiagonalAlgebra |
| 3 | import Mathlib.LinearAlgebra.QuadraticForm.Basic |
| 4 | import Mathlib.LinearAlgebra.Matrix.BilinearForm |
| 5 | |
| 6 | /-! # Symmetric Congruence Diagonal -/ |
| 7 | |
| 8 | namespace OAI.RepresentationTheory.Weil.Local.SymmetricCongruenceDiagonal.Construction |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! Congruence diagonalization of a nonsingular symmetric matrix over the local base field. -/ |
| 13 | |
| 14 | open _root_.Matrix _root_.Module |
| 15 | |
| 16 | variable {k : Type} [Field k] [CharZero k] {n : ℕ} |
| 17 | |
| 18 | theorem symmetric_generalLinear_congruence_diagonal |
| 19 | (M : FunctionsMetaplectic.Construction.GeneralLinear k n) (hM : M.val.IsSymm) : |
| 20 | ∃ (A : FunctionsMetaplectic.Construction.GeneralLinear k n) (a : Fin n → kˣ), |
| 21 | A.val.transpose * M.val * A.val = diagonal (fun i => (a i).val) := by |
| 22 | let : Invertible (2 : k) := invertibleOfNonzero (by norm_num) |
| 23 | obtain ⟨v, hv⟩ := LinearMap.BilinForm.exists_orthogonal_basis (K := k) (V := FunctionsMetaplectic.Construction.Position k n) |
| 24 | (B := M.val.toBilin') |
| 25 | (LinearMap.BilinForm.isSymm_iff.mp (Matrix.isSymm_toBilin'_iff_isSymm.mpr hM)) |
| 26 | let e' : Fin (finrank k (FunctionsMetaplectic.Construction.Position k n)) ≃ Fin n := finCongr (by simp [FunctionsMetaplectic.Construction.Position]) |
| 27 | let b : Basis (Fin n) k (FunctionsMetaplectic.Construction.Position k n) := v.reindex e' |
| 28 | have hb : M.val.toBilin'.IsOrthoᵢ b := by |
| 29 | intro i j hij |
| 30 | change M.val.toBilin' ((v.reindex e') i) ((v.reindex e') j) = 0 |
| 31 | rw [Basis.reindex_apply, Basis.reindex_apply] |
| 32 | exact (LinearMap.isOrthoᵢ_def.mp hv) (e'.symm i) (e'.symm j) (e'.symm.injective.ne hij) |
| 33 | let e := Pi.basisFun k (Fin n) |
| 34 | let A : FunctionsMetaplectic.Construction.GeneralLinear k n := { |
| 35 | val := e.toMatrix b |
| 36 | inv := b.toMatrix e |
| 37 | val_inv := e.toMatrix_mul_toMatrix_flip b |
| 38 | inv_val := b.toMatrix_mul_toMatrix_flip e } |
| 39 | let d := fun i => M.val.toBilin' (b i) (b i) |
| 40 | have hcol (i : Fin n) : A.val.col i = b i := by funext j; rfl |
| 41 | have hdiag : A.val.transpose * M.val * A.val = diagonal d := by |
| 42 | ext i j |
| 43 | rw [SiegelGaussian.Construction.matrix_congruence_entry, hcol, hcol, ← Matrix.toBilin'_apply'] |
| 44 | by_cases hij : i = j |
| 45 | · subst j |
| 46 | simp only [diagonal_apply_eq] |
| 47 | rfl |
| 48 | · rw [diagonal_apply_ne _ hij] |
| 49 | exact hb hij |
| 50 | have hAdet : A.val.det ≠ 0 := ((Matrix.isUnit_iff_isUnit_det A.val).mp A.isUnit).ne_zero |
| 51 | have hMdet : M.val.det ≠ 0 := ((Matrix.isUnit_iff_isUnit_det M.val).mp M.isUnit).ne_zero |
| 52 | have hprod : ∏ i, d i ≠ 0 := by |
| 53 | rw [← det_diagonal, ← hdiag, det_mul, det_mul, det_transpose] |
| 54 | exact mul_ne_zero (mul_ne_zero hAdet hMdet) hAdet |
| 55 | have hd (i : Fin n) : d i ≠ 0 := (Finset.prod_ne_zero_iff.mp hprod) i (Finset.mem_univ i) |
| 56 | exact ⟨A, fun i => Units.mk0 (d i) (hd i), hdiag⟩ |
| 57 | |
| 58 | end |
| 59 | |
| 60 | end OAI.RepresentationTheory.Weil.Local.SymmetricCongruenceDiagonal.Construction |