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.ContinuousEndMatrixEquiv |
| 2 | import Mathlib.LinearAlgebra.Matrix.Block |
| 3 | |
| 4 | /-! # Upper Unitriangular Matrices -/ |
| 5 | |
| 6 | namespace OAI.NumberTheory.ArithmeticGroups.Lattices.UpperUnitriangularMatrices.Construction |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Upper unitriangular matrices are stable under multiplication and |
| 11 | inversion, and their bounded coordinate subsets are compact in GL. -/ |
| 12 | |
| 13 | open Set _root_.Matrix |
| 14 | open scoped Classical _root_.Matrix.Norms.Operator |
| 15 | |
| 16 | def IsUpperUnitriangular {n : ℕ} (M : Matrix (Fin n) (Fin n) ℝ) : Prop := |
| 17 | M.IsUpperTriangular ∧ ∀ i, M i i = 1 |
| 18 | |
| 19 | theorem upper_triangular_mul_diagonal {n : ℕ} |
| 20 | (M N : Matrix (Fin n) (Fin n) ℝ) (hM : M.IsUpperTriangular) (hN : N.IsUpperTriangular) |
| 21 | (i : Fin n) : (M * N) i i = M i i * N i i := by |
| 22 | rw [Matrix.mul_apply] |
| 23 | apply Finset.sum_eq_single i |
| 24 | · intro j _ hji |
| 25 | rcases lt_or_gt_of_ne hji with h | h |
| 26 | · rw [hM h, zero_mul] |
| 27 | · rw [hN h, mul_zero] |
| 28 | · simp |
| 29 | |
| 30 | theorem IsUpperUnitriangular.mul {n : ℕ} {M N : Matrix (Fin n) (Fin n) ℝ} |
| 31 | (hM : IsUpperUnitriangular M) (hN : IsUpperUnitriangular N) : IsUpperUnitriangular (M * N) := |
| 32 | ⟨hM.1.mul hN.1, fun i => by rw [upper_triangular_mul_diagonal M N hM.1 hN.1, hM.2, hN.2, one_mul]⟩ |
| 33 | |
| 34 | theorem IsUpperUnitriangular.det {n : ℕ} {M : Matrix (Fin n) (Fin n) ℝ} |
| 35 | (hM : IsUpperUnitriangular M) : M.det = 1 := by |
| 36 | rw [Matrix.det_of_isUpperTriangular hM.1] |
| 37 | simp only [hM.2, Finset.prod_const_one] |
| 38 | |
| 39 | theorem IsUpperUnitriangular.isUnit {n : ℕ} {M : Matrix (Fin n) (Fin n) ℝ} |
| 40 | (hM : IsUpperUnitriangular M) : IsUnit M := |
| 41 | M.isUnit_iff_isUnit_det.mpr (hM.det.symm ▸ isUnit_one) |
| 42 | |
| 43 | theorem IsUpperUnitriangular.unit_inv {n : ℕ} (g : (Matrix (Fin n) (Fin n) ℝ)ˣ) |
| 44 | (hg : IsUpperUnitriangular g.val) : IsUpperUnitriangular (g⁻¹).val := by |
| 45 | let : Invertible g.val := g.invertible |
| 46 | have htri : (g⁻¹).val.IsUpperTriangular := by |
| 47 | rw [Matrix.GeneralLinearGroup.coe_inv] |
| 48 | exact Matrix.blockTriangular_inv_of_blockTriangular hg.1 |
| 49 | refine ⟨htri, fun i => ?_⟩ |
| 50 | have he := congrArg (fun M : Matrix (Fin n) (Fin n) ℝ => M i i) g.val_inv |
| 51 | change (g.val * (g⁻¹).val) i i = (1 : Matrix (Fin n) (Fin n) ℝ) i i at he |
| 52 | rw [upper_triangular_mul_diagonal _ _ hg.1 htri, hg.2, one_mul, Matrix.one_apply_eq] at he |
| 53 | exact he |
| 54 | |
| 55 | theorem isClosed_upper_unitriangular (n : ℕ) : |
| 56 | IsClosed {M : Matrix (Fin n) (Fin n) ℝ | IsUpperUnitriangular M} := by |
| 57 | have hu : IsClosed {M : Matrix (Fin n) (Fin n) ℝ | ∀ i j, j < i → M i j = 0} := by |
| 58 | simp only [Set.ofPred_forall] |
| 59 | exact isClosed_iInter fun i => isClosed_iInter fun j => isClosed_iInter fun _ => |
| 60 | isClosed_eq ((continuous_apply j).comp (continuous_apply i)) continuous_const |
| 61 | have hd : IsClosed {M : Matrix (Fin n) (Fin n) ℝ | ∀ i, M i i = 1} := by |
| 62 | simp only [Set.ofPred_forall] |
| 63 | exact isClosed_iInter fun i => |
| 64 | isClosed_eq ((continuous_apply i).comp (continuous_apply i)) continuous_const |
| 65 | exact hu.inter hd |
| 66 | |
| 67 | theorem bounded_upper_unitriangular_isCompact (n : ℕ) (c : ℝ) : |
| 68 | IsCompact {g : (Matrix (Fin n) (Fin n) ℝ)ˣ | |
| 69 | IsUpperUnitriangular g.val ∧ ∀ i j, |g.val i j| ≤ c} := by |
| 70 | let C : Set (Matrix (Fin n) (Fin n) ℝ) := {M | IsUpperUnitriangular M ∧ ∀ i j, |M i j| ≤ c} |
| 71 | have hc : IsClosed C := by |
| 72 | change IsClosed ({M : Matrix (Fin n) (Fin n) ℝ | IsUpperUnitriangular M} ∩ |
| 73 | {M : Matrix (Fin n) (Fin n) ℝ | ∀ i j, |M i j| ≤ c}) |
| 74 | apply (isClosed_upper_unitriangular n).inter |
| 75 | simp only [Set.ofPred_forall] |
| 76 | exact isClosed_iInter fun i => isClosed_iInter fun j => |
| 77 | isClosed_le (((continuous_apply j).comp (continuous_apply i)).abs) continuous_const |
| 78 | have hbox : IsCompact (Set.pi Set.univ (fun _ : Fin n => |
| 79 | Set.pi Set.univ (fun _ : Fin n => Set.Icc (-c) c))) := |
| 80 | isCompact_univ_pi (fun _ => isCompact_univ_pi (fun _ => isCompact_Icc)) |
| 81 | have hC : IsCompact C := hbox.of_isClosed_subset hc (by |
| 82 | intro M hM i _ j _ |
| 83 | exact abs_le.mp (hM.2 i j)) |
| 84 | apply Units.isOpenEmbedding_val.isEmbedding.isInducing.isCompact_preimage' hC |
| 85 | intro M hM |
| 86 | exact hM.1.isUnit |
| 87 | |
| 88 | end |
| 89 | |
| 90 | end OAI.NumberTheory.ArithmeticGroups.Lattices.UpperUnitriangularMatrices.Construction |