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.Positive.TriangularMatrices |
| 2 | |
| 3 | /-! # Matrix KAN Uniqueness -/ |
| 4 | |
| 5 | namespace OAI.NumberTheory.ArithmeticGroups.Lattices |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | /-! Uniqueness of the orthogonal, positive diagonal, upper unitriangular |
| 10 | factorization, with the factors viewed as real matrices. -/ |
| 11 | |
| 12 | open scoped Classical |
| 13 | |
| 14 | theorem Positive.TriangularMatrices.Construction.IsPositiveUpperTriangular.isUnit {n : ℕ} {M : Matrix (Fin n) (Fin n) ℝ} |
| 15 | (hM : Positive.TriangularMatrices.Construction.IsPositiveUpperTriangular M) : IsUnit M := by |
| 16 | apply M.isUnit_iff_isUnit_det.mpr |
| 17 | apply isUnit_iff_ne_zero.mpr |
| 18 | rw [Matrix.det_of_isUpperTriangular hM.1] |
| 19 | exact ne_of_gt (Finset.prod_pos (fun i _ => hM.2 i)) |
| 20 | |
| 21 | theorem MatrixKANUniqueness.Construction.orthogonal_matrix_unit_inv {n : ℕ} (k : (Matrix (Fin n) (Fin n) ℝ)ˣ) |
| 22 | (hk : k.val ∈ Matrix.orthogonalGroup (Fin n) ℝ) : |
| 23 | (k⁻¹).val ∈ Matrix.orthogonalGroup (Fin n) ℝ := by |
| 24 | have hi : (k⁻¹).val = k.val.transpose := |
| 25 | k.inv_eq_of_mul_eq_one_right ((Matrix.mem_orthogonalGroup_iff (Fin n) ℝ).mp hk) |
| 26 | apply (Matrix.mem_orthogonalGroup_iff (Fin n) ℝ).mpr |
| 27 | rw [hi, Matrix.transpose_transpose] |
| 28 | exact (Matrix.mem_orthogonalGroup_iff' (Fin n) ℝ).mp hk |
| 29 | |
| 30 | theorem MatrixKANUniqueness.Construction.orthogonal_positive_triangular_factorization_unique {n : ℕ} |
| 31 | (k₁ k₂ t₁ t₂ : (Matrix (Fin n) (Fin n) ℝ)ˣ) |
| 32 | (hk₁ : k₁.val ∈ Matrix.orthogonalGroup (Fin n) ℝ) |
| 33 | (hk₂ : k₂.val ∈ Matrix.orthogonalGroup (Fin n) ℝ) |
| 34 | (ht₁ : Positive.TriangularMatrices.Construction.IsPositiveUpperTriangular t₁.val) (ht₂ : Positive.TriangularMatrices.Construction.IsPositiveUpperTriangular t₂.val) |
| 35 | (h : k₁ * t₁ = k₂ * t₂) : k₁ = k₂ ∧ t₁ = t₂ := by |
| 36 | have he : k₂⁻¹ * k₁ = t₂ * t₁⁻¹ := by |
| 37 | calc |
| 38 | k₂⁻¹ * k₁ = k₂⁻¹ * (k₁ * t₁) * t₁⁻¹ := by group |
| 39 | _ = k₂⁻¹ * (k₂ * t₂) * t₁⁻¹ := by rw [h] |
| 40 | _ = t₂ * t₁⁻¹ := by group |
| 41 | have hu : Positive.TriangularMatrices.Construction.IsPositiveUpperTriangular (k₂⁻¹ * k₁).val := by |
| 42 | rw [he] |
| 43 | exact ht₂.mul (ht₁.unit_inv t₁) |
| 44 | have ho : (k₂⁻¹ * k₁).val ∈ Matrix.orthogonalGroup (Fin n) ℝ := |
| 45 | (Matrix.orthogonalGroup (Fin n) ℝ).mul_mem (MatrixKANUniqueness.Construction.orthogonal_matrix_unit_inv k₂ hk₂) hk₁ |
| 46 | have hk : k₁ = k₂ := |
| 47 | (eq_of_inv_mul_eq_one (Positive.TriangularMatrices.Construction.positive_upper_triangular_orthogonal_eq_one _ hu ho)).symm |
| 48 | refine ⟨hk, ?_⟩ |
| 49 | rw [hk] at h |
| 50 | exact mul_left_cancel h |
| 51 | |
| 52 | theorem MatrixKANUniqueness.Construction.positive_diagonal_mul_unitriangular {n : ℕ} (a : Fin n → ℝ) |
| 53 | (ha : ∀ i, 0 < a i) (U : Matrix (Fin n) (Fin n) ℝ) (hU : UpperUnitriangularMatrices.Construction.IsUpperUnitriangular U) : |
| 54 | Positive.TriangularMatrices.Construction.IsPositiveUpperTriangular (Matrix.diagonal a * U) := by |
| 55 | have hd : (Matrix.diagonal a).IsUpperTriangular := Matrix.blockTriangular_diagonal a |
| 56 | refine ⟨hd.mul hU.1, fun i => ?_⟩ |
| 57 | rw [Matrix.diagonal_mul, hU.2 i, mul_one] |
| 58 | exact ha i |
| 59 | |
| 60 | theorem MatrixKANUniqueness.Construction.matrix_kan_factorization_unique {n : ℕ} |
| 61 | (K₁ K₂ U₁ U₂ : Matrix (Fin n) (Fin n) ℝ) (a₁ a₂ : Fin n → ℝ) |
| 62 | (hK₁ : K₁ ∈ Matrix.orthogonalGroup (Fin n) ℝ) |
| 63 | (hK₂ : K₂ ∈ Matrix.orthogonalGroup (Fin n) ℝ) |
| 64 | (ha₁ : ∀ i, 0 < a₁ i) (ha₂ : ∀ i, 0 < a₂ i) |
| 65 | (hU₁ : UpperUnitriangularMatrices.Construction.IsUpperUnitriangular U₁) (hU₂ : UpperUnitriangularMatrices.Construction.IsUpperUnitriangular U₂) |
| 66 | (h : K₁ * Matrix.diagonal a₁ * U₁ = K₂ * Matrix.diagonal a₂ * U₂) : |
| 67 | K₁ = K₂ ∧ a₁ = a₂ ∧ U₁ = U₂ := by |
| 68 | let k₁ := OrthogonalOperatorMatrices.Construction.orthogonalMatrixUnit K₁ hK₁ |
| 69 | let k₂ := OrthogonalOperatorMatrices.Construction.orthogonalMatrixUnit K₂ hK₂ |
| 70 | have hp₁ := MatrixKANUniqueness.Construction.positive_diagonal_mul_unitriangular a₁ ha₁ U₁ hU₁ |
| 71 | have hp₂ := MatrixKANUniqueness.Construction.positive_diagonal_mul_unitriangular a₂ ha₂ U₂ hU₂ |
| 72 | let t₁ := hp₁.isUnit.unit |
| 73 | let t₂ := hp₂.isUnit.unit |
| 74 | have ht₁ : t₁.val = Matrix.diagonal a₁ * U₁ := hp₁.isUnit.unit_spec |
| 75 | have ht₂ : t₂.val = Matrix.diagonal a₂ * U₂ := hp₂.isUnit.unit_spec |
| 76 | have he : k₁ * t₁ = k₂ * t₂ := by |
| 77 | apply Units.ext |
| 78 | change K₁ * t₁.val = K₂ * t₂.val |
| 79 | rw [ht₁, ht₂, ← mul_assoc, ← mul_assoc] |
| 80 | exact h |
| 81 | obtain ⟨hk, ht⟩ := MatrixKANUniqueness.Construction.orthogonal_positive_triangular_factorization_unique |
| 82 | k₁ k₂ t₁ t₂ hK₁ hK₂ (ht₁.symm ▸ hp₁) (ht₂.symm ▸ hp₂) he |
| 83 | have he' : Matrix.diagonal a₁ * U₁ = Matrix.diagonal a₂ * U₂ := by |
| 84 | rw [← ht₁, ← ht₂, ht] |
| 85 | have ha : a₁ = a₂ := by |
| 86 | funext i |
| 87 | have hi := congrArg (fun M : Matrix (Fin n) (Fin n) ℝ => M i i) he' |
| 88 | simpa only [Matrix.diagonal_mul, hU₁.2 i, hU₂.2 i, mul_one] using hi |
| 89 | refine ⟨congrArg Units.val hk, ha, ?_⟩ |
| 90 | ext i j |
| 91 | have hi := congrArg (fun M : Matrix (Fin n) (Fin n) ℝ => M i j) he' |
| 92 | rw [← ha, Matrix.diagonal_mul, Matrix.diagonal_mul] at hi |
| 93 | exact mul_left_cancel₀ (ne_of_gt (ha₁ i)) hi |
| 94 | |
| 95 | end |
| 96 | |
| 97 | end OAI.NumberTheory.ArithmeticGroups.Lattices |