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 OAI.NumberTheory.ArithmeticGroups.Lattices.OrthogonalOperatorMatrices |
| 3 | |
| 4 | /-! # Triangular Matrices -/ |
| 5 | |
| 6 | namespace OAI.NumberTheory.ArithmeticGroups.Lattices.Positive.TriangularMatrices.Construction |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Positive upper triangular matrices form a subgroup of GL and |
| 11 | meet the orthogonal group only in the identity. -/ |
| 12 | |
| 13 | open scoped Classical |
| 14 | |
| 15 | def IsPositiveUpperTriangular {n : ℕ} (M : Matrix (Fin n) (Fin n) ℝ) : Prop := |
| 16 | M.IsUpperTriangular ∧ ∀ i, 0 < M i i |
| 17 | |
| 18 | theorem IsPositiveUpperTriangular.mul {n : ℕ} {M N : Matrix (Fin n) (Fin n) ℝ} |
| 19 | (hM : IsPositiveUpperTriangular M) (hN : IsPositiveUpperTriangular N) : |
| 20 | IsPositiveUpperTriangular (M * N) := by |
| 21 | refine ⟨hM.1.mul hN.1, fun i => ?_⟩ |
| 22 | rw [UpperUnitriangularMatrices.Construction.upper_triangular_mul_diagonal M N hM.1 hN.1] |
| 23 | exact mul_pos (hM.2 i) (hN.2 i) |
| 24 | |
| 25 | theorem IsPositiveUpperTriangular.unit_inv {n : ℕ} (g : (Matrix (Fin n) (Fin n) ℝ)ˣ) |
| 26 | (hg : IsPositiveUpperTriangular g.val) : IsPositiveUpperTriangular (g⁻¹).val := by |
| 27 | let : Invertible g.val := g.invertible |
| 28 | have htri : (g⁻¹).val.IsUpperTriangular := by |
| 29 | rw [Matrix.GeneralLinearGroup.coe_inv] |
| 30 | exact Matrix.blockTriangular_inv_of_blockTriangular hg.1 |
| 31 | refine ⟨htri, fun i => ?_⟩ |
| 32 | have he := congrArg (fun M : Matrix (Fin n) (Fin n) ℝ => M i i) g.val_inv |
| 33 | change (g.val * (g⁻¹).val) i i = (1 : Matrix (Fin n) (Fin n) ℝ) i i at he |
| 34 | rw [UpperUnitriangularMatrices.Construction.upper_triangular_mul_diagonal _ _ hg.1 htri, Matrix.one_apply_eq] at he |
| 35 | exact (mul_pos_iff_of_pos_left (hg.2 i)).mp (he.symm ▸ zero_lt_one) |
| 36 | |
| 37 | theorem positive_upper_triangular_orthogonal_eq_one {n : ℕ} |
| 38 | (g : (Matrix (Fin n) (Fin n) ℝ)ˣ) (hg : IsPositiveUpperTriangular g.val) |
| 39 | (ho : g.val ∈ Matrix.orthogonalGroup (Fin n) ℝ) : g = 1 := by |
| 40 | have hi : (g⁻¹).val = g.val.transpose := |
| 41 | g.inv_eq_of_mul_eq_one_right ((Matrix.mem_orthogonalGroup_iff (Fin n) ℝ).mp ho) |
| 42 | have ht := (hg.unit_inv g).1 |
| 43 | rw [hi] at ht |
| 44 | have hz : ∀ i j, i ≠ j → g.val i j = 0 := by |
| 45 | intro i j hij |
| 46 | rcases lt_or_gt_of_ne hij with h | h |
| 47 | · exact ht h |
| 48 | · exact hg.1 h |
| 49 | have hd : ∀ i, g.val i i = 1 := by |
| 50 | intro i |
| 51 | have he := congrArg (fun M : Matrix (Fin n) (Fin n) ℝ => M i i) |
| 52 | ((Matrix.mem_orthogonalGroup_iff (Fin n) ℝ).mp ho) |
| 53 | rw [UpperUnitriangularMatrices.Construction.upper_triangular_mul_diagonal _ _ hg.1 ht, Matrix.one_apply_eq] at he |
| 54 | change g.val i i * g.val i i = 1 at he |
| 55 | nlinarith [hg.2 i] |
| 56 | apply Units.ext |
| 57 | ext i j |
| 58 | by_cases hij : i = j |
| 59 | · subst j |
| 60 | exact (hd i).trans (Matrix.one_apply_eq i).symm |
| 61 | · rw [hz i j hij, Units.val_one, Matrix.one_apply, ite_eq_right hij] |
| 62 | |
| 63 | end |
| 64 | |
| 65 | end OAI.NumberTheory.ArithmeticGroups.Lattices.Positive.TriangularMatrices.Construction |