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.NumberTheory.ArithmeticGroups.Lattices.UpperUnitriangularMatrices |
| 2 | import Mathlib.Order.Fin.Basic |
| 3 | import Mathlib.Data.Fin.Tuple.Basic |
| 4 | import Mathlib.LinearAlgebra.Matrix.Determinant.Misc |
| 5 | |
| 6 | /-! # Isolated Pivot Matrices -/ |
| 7 | |
| 8 | namespace OAI.NumberTheory.ArithmeticGroups.Lattices.IsolatedPivotMatrices.Construction |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! Inserting an isolated pivot into a matrix respects products and |
| 13 | upper unitriangular matrices. -/ |
| 14 | |
| 15 | open scoped Classical |
| 16 | |
| 17 | def isolatedPivotMatrix {n : ℕ} (r c : Fin (n + 1)) |
| 18 | (M : Matrix (Fin n) (Fin n) ℝ) (a : ℝ) : Matrix (Fin (n + 1)) (Fin (n + 1)) ℝ := |
| 19 | Fin.insertNth r (Pi.single c a) (fun i => Fin.insertNth c 0 (M i)) |
| 20 | |
| 21 | @[simp] theorem isolatedPivotMatrix_pivot {n : ℕ} (r c : Fin (n + 1)) |
| 22 | (M : Matrix (Fin n) (Fin n) ℝ) (a : ℝ) : isolatedPivotMatrix r c M a r c = a := by |
| 23 | simp [isolatedPivotMatrix] |
| 24 | |
| 25 | @[simp] theorem isolatedPivotMatrix_row {n : ℕ} (r c : Fin (n + 1)) |
| 26 | (M : Matrix (Fin n) (Fin n) ℝ) (a : ℝ) (j : Fin n) : |
| 27 | isolatedPivotMatrix r c M a r (c.succAbove j) = 0 := by |
| 28 | simp [isolatedPivotMatrix, c.succAbove_ne j] |
| 29 | |
| 30 | @[simp] theorem isolatedPivotMatrix_column {n : ℕ} (r c : Fin (n + 1)) |
| 31 | (M : Matrix (Fin n) (Fin n) ℝ) (a : ℝ) (i : Fin n) : |
| 32 | isolatedPivotMatrix r c M a (r.succAbove i) c = 0 := by |
| 33 | simp [isolatedPivotMatrix] |
| 34 | |
| 35 | @[simp] theorem isolatedPivotMatrix_minor {n : ℕ} (r c : Fin (n + 1)) |
| 36 | (M : Matrix (Fin n) (Fin n) ℝ) (a : ℝ) (i j : Fin n) : |
| 37 | isolatedPivotMatrix r c M a (r.succAbove i) (c.succAbove j) = M i j := by |
| 38 | simp [isolatedPivotMatrix] |
| 39 | |
| 40 | theorem eq_isolatedPivotMatrix {n : ℕ} (r c : Fin (n + 1)) |
| 41 | (M : Matrix (Fin (n + 1)) (Fin (n + 1)) ℝ) |
| 42 | (hrow : ∀ j, j ≠ c → M r j = 0) (hcol : ∀ i, i ≠ r → M i c = 0) : |
| 43 | M = isolatedPivotMatrix r c (M.submatrix r.succAbove c.succAbove) (M r c) := by |
| 44 | ext i j |
| 45 | cases i using Fin.succAboveCases r <;> cases j using Fin.succAboveCases c <;> |
| 46 | simp [hrow, hcol, Fin.succAbove_ne, Matrix.submatrix_apply] |
| 47 | |
| 48 | theorem isolatedPivotMatrix_mul {n : ℕ} (r s t : Fin (n + 1)) |
| 49 | (A B : Matrix (Fin n) (Fin n) ℝ) (a b : ℝ) : |
| 50 | isolatedPivotMatrix r s A a * isolatedPivotMatrix s t B b = |
| 51 | isolatedPivotMatrix r t (A * B) (a * b) := by |
| 52 | ext i j |
| 53 | rw [Matrix.mul_apply, Fin.sum_univ_succAbove _ s] |
| 54 | cases i using Fin.succAboveCases r <;> cases j using Fin.succAboveCases t <;> |
| 55 | simp [Matrix.mul_apply] |
| 56 | |
| 57 | theorem isolatedPivotMatrix_unitriangular {n : ℕ} (p : Fin (n + 1)) |
| 58 | (M : Matrix (Fin n) (Fin n) ℝ) (hM : UpperUnitriangularMatrices.Construction.IsUpperUnitriangular M) : |
| 59 | UpperUnitriangularMatrices.Construction.IsUpperUnitriangular (isolatedPivotMatrix p p M 1) := by |
| 60 | constructor |
| 61 | · intro i j hij |
| 62 | change j < i at hij |
| 63 | cases i using Fin.succAboveCases p with |
| 64 | | x => |
| 65 | cases j using Fin.succAboveCases p with |
| 66 | | x => exact (lt_irrefl _ hij).elim |
| 67 | | p j => simp |
| 68 | | p i => |
| 69 | cases j using Fin.succAboveCases p with |
| 70 | | x => simp |
| 71 | | p j => |
| 72 | rw [isolatedPivotMatrix_minor] |
| 73 | exact hM.1 ((Fin.succAboveOrderEmb p).lt_iff_lt.mp hij) |
| 74 | · intro i |
| 75 | cases i using Fin.succAboveCases p <;> simp [hM.2] |
| 76 | |
| 77 | theorem isolatedPivotMatrix_minor_isUnit {n : ℕ} (r c : Fin (n + 1)) |
| 78 | (M : Matrix (Fin n) (Fin n) ℝ) (a : ℝ) |
| 79 | (hM : IsUnit (isolatedPivotMatrix r c M a)) : IsUnit M := by |
| 80 | apply M.isUnit_iff_isUnit_det.mpr |
| 81 | apply isUnit_iff_ne_zero.mpr |
| 82 | intro hz |
| 83 | have hdet : (isolatedPivotMatrix r c M a).det ≠ 0 := |
| 84 | isUnit_iff_ne_zero.mp ((isolatedPivotMatrix r c M a).isUnit_iff_isUnit_det.mp hM) |
| 85 | apply hdet |
| 86 | rw [Matrix.det_succ_row _ r] |
| 87 | apply Finset.sum_eq_zero |
| 88 | intro j _ |
| 89 | cases j using Fin.succAboveCases c with |
| 90 | | x => |
| 91 | have he : (isolatedPivotMatrix r c M a).submatrix r.succAbove c.succAbove = M := by |
| 92 | ext i j |
| 93 | exact isolatedPivotMatrix_minor r c M a i j |
| 94 | simp [he, hz] |
| 95 | | p j => simp |
| 96 | |
| 97 | end |
| 98 | |
| 99 | end OAI.NumberTheory.ArithmeticGroups.Lattices.IsolatedPivotMatrices.Construction |