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.Quaternion.Arithmetic.Norm |
| 2 | import Mathlib.Algebra.QuaternionBasis |
| 3 | |
| 4 | /-! # Split Matrices -/ |
| 5 | |
| 6 | namespace OAI.NumberTheory.Quaternion.Arithmetic.SplitMatrices |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | section |
| 11 | |
| 12 | /-! A solution of the binary norm equation gives an explicit |
| 13 | two-dimensional matrix representation of a quaternion algebra. -/ |
| 14 | |
| 15 | open scoped Classical _root_.Quaternion _root_.Matrix |
| 16 | open QuaternionAlgebra _root_.Matrix |
| 17 | |
| 18 | variable {K : Type*} [Field K] |
| 19 | |
| 20 | def quaternionSplittingBasis (a b x y : K) (h : x ^ 2 - a * y ^ 2 = b) : |
| 21 | QuaternionAlgebra.Basis (Matrix (Fin 2) (Fin 2) K) a 0 b where |
| 22 | i := !![0, a; 1, 0] |
| 23 | j := !![x, -a * y; y, -x] |
| 24 | k := !![a * y, -a * x; x, -a * y] |
| 25 | i_mul_i := by |
| 26 | ext r s |
| 27 | fin_cases r <;> fin_cases s <;> simp [Matrix.mul_apply, Fin.sum_univ_two] |
| 28 | j_mul_j := by |
| 29 | ext r s |
| 30 | fin_cases r <;> fin_cases s <;> simp [Matrix.mul_apply, Fin.sum_univ_two] |
| 31 | all_goals ring_nf |
| 32 | all_goals linear_combination h |
| 33 | i_mul_j := by |
| 34 | ext r s |
| 35 | fin_cases r <;> fin_cases s <;> simp [Matrix.mul_apply, Fin.sum_univ_two] |
| 36 | j_mul_i := by |
| 37 | ext r s |
| 38 | fin_cases r <;> fin_cases s <;> simp [Matrix.mul_apply, Fin.sum_univ_two] <;> ring |
| 39 | |
| 40 | def quaternionSplittingMap (a b x y : K) (h : x ^ 2 - a * y ^ 2 = b) : |
| 41 | ℍ[K,a,b] →ₐ[K] Matrix (Fin 2) (Fin 2) K := (quaternionSplittingBasis a b x y h).liftHom |
| 42 | |
| 43 | theorem quaternionSplittingMap_apply (a b x y : K) (h : x ^ 2 - a * y ^ 2 = b) (q : ℍ[K,a,b]) : |
| 44 | quaternionSplittingMap a b x y h q = |
| 45 | !![q.re + q.imJ * x + q.imK * a * y, a * q.imI - a * q.imJ * y - a * q.imK * x; |
| 46 | q.imI + q.imJ * y + q.imK * x, q.re - q.imJ * x - q.imK * a * y] := by |
| 47 | ext r s |
| 48 | fin_cases r <;> fin_cases s <;> |
| 49 | simp [quaternionSplittingMap, QuaternionAlgebra.Basis.liftHom_apply, QuaternionAlgebra.Basis.lift, |
| 50 | quaternionSplittingBasis, Matrix.algebraMap_matrix_apply] <;> ring |
| 51 | |
| 52 | theorem quaternionSplittingMap_det (a b x y : K) (h : x ^ 2 - a * y ^ 2 = b) (q : ℍ[K,a,b]) : |
| 53 | (quaternionSplittingMap a b x y h q).det = Norm.quaternionNorm a b q := by |
| 54 | rw [quaternionSplittingMap_apply, Matrix.det_fin_two, Norm.quaternionNorm_formula] |
| 55 | simp only [Matrix.of_apply, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_fin_one] |
| 56 | linear_combination (a * q.imK ^ 2 - q.imJ ^ 2) * h |
| 57 | |
| 58 | end |
| 59 | |
| 60 | /-! The explicit quaternion splitting representation is a faithful |
| 61 | algebra isomorphism when the structure constants are nonzero. -/ |
| 62 | |
| 63 | open scoped Classical _root_.Quaternion |
| 64 | open QuaternionAlgebra _root_.Matrix |
| 65 | |
| 66 | variable {K : Type*} [Field K] [CharZero K] |
| 67 | |
| 68 | theorem quaternionSplittingMap_eq_zero (a b x y : K) (ha : a ≠ 0) (hb : b ≠ 0) |
| 69 | (h : x ^ 2 - a * y ^ 2 = b) (q : ℍ[K,a,b]) |
| 70 | (hq : quaternionSplittingMap a b x y h q = 0) : q = 0 := by |
| 71 | rw [quaternionSplittingMap_apply] at hq |
| 72 | have h00 := congrArg (fun M : Matrix (Fin 2) (Fin 2) K => M 0 0) hq |
| 73 | have h01 := congrArg (fun M : Matrix (Fin 2) (Fin 2) K => M 0 1) hq |
| 74 | have h10 := congrArg (fun M : Matrix (Fin 2) (Fin 2) K => M 1 0) hq |
| 75 | have h11 := congrArg (fun M : Matrix (Fin 2) (Fin 2) K => M 1 1) hq |
| 76 | change q.re + q.imJ * x + q.imK * a * y = 0 at h00 |
| 77 | change a * q.imI - a * q.imJ * y - a * q.imK * x = 0 at h01 |
| 78 | change q.imI + q.imJ * y + q.imK * x = 0 at h10 |
| 79 | change q.re - q.imJ * x - q.imK * a * y = 0 at h11 |
| 80 | have hr : (2 : K) * q.re = 0 := by linear_combination h00 + h11 |
| 81 | have hi : (2 * a) * q.imI = 0 := by linear_combination h01 + a * h10 |
| 82 | have hj : (2 * b) * q.imJ = 0 := by |
| 83 | linear_combination x * h00 - x * h11 - a * y * h10 + y * h01 - 2 * q.imJ * h |
| 84 | have hk : (2 * a * b) * q.imK = 0 := by |
| 85 | linear_combination a * x * h10 - x * h01 - a * y * h00 + a * y * h11 - 2 * a * q.imK * h |
| 86 | apply QuaternionAlgebra.ext |
| 87 | · exact (mul_eq_zero.mp hr).resolve_left two_ne_zero |
| 88 | · exact (mul_eq_zero.mp hi).resolve_left (mul_ne_zero two_ne_zero ha) |
| 89 | · exact (mul_eq_zero.mp hj).resolve_left (mul_ne_zero two_ne_zero hb) |
| 90 | · exact (mul_eq_zero.mp hk).resolve_left (mul_ne_zero (mul_ne_zero two_ne_zero ha) hb) |
| 91 | |
| 92 | theorem quaternionSplittingMap_injective (a b x y : K) (ha : a ≠ 0) (hb : b ≠ 0) |
| 93 | (h : x ^ 2 - a * y ^ 2 = b) : Function.Injective (quaternionSplittingMap a b x y h) := by |
| 94 | intro q r he |
| 95 | apply sub_eq_zero.mp |
| 96 | apply quaternionSplittingMap_eq_zero a b x y ha hb h |
| 97 | rw [map_sub, he, sub_self] |
| 98 | |
| 99 | def quaternionSplittingEquiv (a b x y : K) (ha : a ≠ 0) (hb : b ≠ 0) |
| 100 | (h : x ^ 2 - a * y ^ 2 = b) : ℍ[K,a,b] ≃ₐ[K] Matrix (Fin 2) (Fin 2) K := |
| 101 | AlgEquiv.ofBijective (quaternionSplittingMap a b x y h) ⟨quaternionSplittingMap_injective a b x y ha hb h, |
| 102 | (LinearMap.injective_iff_surjective_of_finrank_eq_finrank |
| 103 | (show Module.finrank K ℍ[K,a,b] = Module.finrank K (Matrix (Fin 2) (Fin 2) K) by |
| 104 | rw [QuaternionAlgebra.finrank_eq_four] |
| 105 | rw [Module.finrank_matrix] |
| 106 | norm_num) |
| 107 | (f := (quaternionSplittingMap a b x y h).toLinearMap)).mp |
| 108 | (quaternionSplittingMap_injective a b x y ha hb h)⟩ |
| 109 | |
| 110 | end |
| 111 | |
| 112 | end OAI.NumberTheory.Quaternion.Arithmetic.SplitMatrices |