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.IntersectionTheory.ProjectionFormula.Projective.LinearChart |
| 2 | import Mathlib.LinearAlgebra.Matrix.NonsingularInverse |
| 3 | import Mathlib.Algebra.Polynomial.Roots |
| 4 | import Mathlib.RingTheory.Localization.Away.Basic |
| 5 | |
| 6 | /-! # Matrix Path -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Polynomial.MatrixPath |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! A polynomial matrix path connects the identity to a prescribed |
| 13 | invertible matrix. Localizing at its determinant gives an actual family |
| 14 | of invertible matrices, with both endpoint evaluations retained. -/ |
| 15 | |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped _root_.Polynomial |
| 19 | |
| 20 | variable {n : ℕ} (A : (Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ)ˣ) |
| 21 | |
| 22 | def matrix : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ[X] := |
| 23 | fun i j => (1 - Polynomial.X) * Polynomial.C ((1 : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ) i j) + |
| 24 | Polynomial.X * Polynomial.C (A.val i j) |
| 25 | |
| 26 | theorem eval_zero : (Polynomial.evalRingHom 0).mapMatrix (matrix A) = 1 := by |
| 27 | ext i j |
| 28 | simp [matrix] |
| 29 | |
| 30 | theorem eval_one : (Polynomial.evalRingHom 1).mapMatrix (matrix A) = A.val := by |
| 31 | ext i j |
| 32 | simp [matrix] |
| 33 | |
| 34 | def determinant : ℂ[X] := (matrix A).det |
| 35 | |
| 36 | theorem determinant_zero : (determinant A).eval 0 = 1 := by |
| 37 | change (Polynomial.evalRingHom 0) (matrix A).det = 1 |
| 38 | rw [RingHom.map_det, MatrixPath.eval_zero, Matrix.det_one] |
| 39 | |
| 40 | theorem determinant_one : (determinant A).eval 1 = A.val.det := by |
| 41 | change (Polynomial.evalRingHom 1) (matrix A).det = _ |
| 42 | rw [RingHom.map_det, eval_one] |
| 43 | |
| 44 | theorem determinant_ne_zero : determinant A ≠ 0 := by |
| 45 | intro h |
| 46 | have hz := determinant_zero A |
| 47 | rw [h, Polynomial.eval_zero] at hz |
| 48 | exact zero_ne_one hz |
| 49 | |
| 50 | theorem finite_bad_parameters : Set.Finite {t : ℂ | (determinant A).eval t = 0} := |
| 51 | Polynomial.finite_setOfPred_isRoot (determinant_ne_zero A) |
| 52 | |
| 53 | abbrev Ring := Localization.Away (determinant A) |
| 54 | |
| 55 | def localizedMatrix : Matrix (Fin (n + 1)) (Fin (n + 1)) (Ring A) := |
| 56 | (algebraMap ℂ[X] (Ring A)).mapMatrix (matrix A) |
| 57 | |
| 58 | theorem localized_isUnit : IsUnit (localizedMatrix A) := by |
| 59 | apply (Matrix.isUnit_iff_isUnit_det _).mpr |
| 60 | rw [localizedMatrix, ← RingHom.map_det] |
| 61 | exact IsLocalization.Away.algebraMap_isUnit (determinant A) |
| 62 | |
| 63 | def unit : (Matrix (Fin (n + 1)) (Fin (n + 1)) (Ring A))ˣ := (localized_isUnit A).unit |
| 64 | |
| 65 | theorem unit_val : (MatrixPath.unit A).val = localizedMatrix A := (localized_isUnit A).unit_spec |
| 66 | |
| 67 | def evaluation (t : ℂ) (ht : (determinant A).eval t ≠ 0) : Ring A →+* ℂ := |
| 68 | IsLocalization.Away.lift (determinant A) (g := Polynomial.evalRingHom t) (isUnit_iff_ne_zero.mpr ht) |
| 69 | |
| 70 | theorem evaluation_algebraMap (t : ℂ) (ht : (determinant A).eval t ≠ 0) (p : ℂ[X]) : |
| 71 | evaluation A t ht (algebraMap ℂ[X] (Ring A) p) = p.eval t := |
| 72 | IsLocalization.Away.lift_eq _ _ p |
| 73 | |
| 74 | theorem evaluate_unit (t : ℂ) (ht : (determinant A).eval t ≠ 0) : |
| 75 | (evaluation A t ht).mapMatrix (MatrixPath.unit A).val = (Polynomial.evalRingHom t).mapMatrix (matrix A) := by |
| 76 | rw [unit_val] |
| 77 | ext i j |
| 78 | exact evaluation_algebraMap A t ht (matrix A i j) |
| 79 | |
| 80 | theorem evaluate_zero (h : (determinant A).eval 0 ≠ 0) : |
| 81 | (evaluation A 0 h).mapMatrix (MatrixPath.unit A).val = 1 := (evaluate_unit A 0 h).trans (MatrixPath.eval_zero A) |
| 82 | |
| 83 | theorem evaluate_one (h : (determinant A).eval 1 ≠ 0) : |
| 84 | (evaluation A 1 h).mapMatrix (MatrixPath.unit A).val = A.val := (evaluate_unit A 1 h).trans (eval_one A) |
| 85 | |
| 86 | theorem zero_good : (determinant A).eval 0 ≠ 0 := by rw [determinant_zero]; exact one_ne_zero |
| 87 | |
| 88 | theorem one_good : (determinant A).eval 1 ≠ 0 := by |
| 89 | rw [determinant_one] |
| 90 | exact (Matrix.isUnits_det_units A).ne_zero |
| 91 | |
| 92 | end |
| 93 | |
| 94 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Polynomial.MatrixPath |