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 Mathlib |
| 2 | |
| 3 | /-! # Congruence -/ |
| 4 | |
| 5 | namespace OAI.NumberTheory.ArithmeticGroups.Congruence.Level |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | open scoped Classical |
| 10 | |
| 11 | /-- A root of unity congruent to 1 modulo an integer at least 3 is 1. |
| 12 | The proof uses a conjugate of a nonzero algebraic integer of norm at least 1. -/ |
| 13 | theorem integral_root_of_unity_congruence |
| 14 | {K : Type*} [Field K] [NumberField K] |
| 15 | (a : K) (ha : IsIntegral ℤ a) |
| 16 | (N : ℕ) (hN : 3 ≤ N) (k : ℕ) (hk : 0 < k) |
| 17 | (hpow : (1 + (N : K) * a) ^ k = 1) : a = 0 := by |
| 18 | by_contra hne |
| 19 | obtain ⟨σ, hσ⟩ := NumberField.exists_conjugate_one_le_norm |
| 20 | (K := K) (α := ⟨a, ha⟩) (by |
| 21 | intro h |
| 22 | exact hne (congrArg (fun x : NumberField.RingOfIntegers K => (x : K)) h)) |
| 23 | have he : (1 + (N : ℂ) * σ a) ^ k = 1 := by |
| 24 | simpa only [map_pow, map_add, map_one, map_mul, map_natCast] using congrArg σ hpow |
| 25 | have hn := Complex.norm_eq_one_of_pow_eq_one he hk.ne' |
| 26 | have hb := norm_sub_le (1 + (N : ℂ) * σ a) 1 |
| 27 | rw [add_sub_cancel_left, norm_mul, Complex.norm_natCast, hn, norm_one] at hb |
| 28 | have hNr : (3 : ℝ) ≤ N := by exact_mod_cast hN |
| 29 | change 1 ≤ ‖σ a‖ at hσ |
| 30 | nlinarith |
| 31 | |
| 32 | theorem complex_integral_root_of_unity_congruence |
| 33 | (a : ℂ) (ha : IsIntegral ℤ a) |
| 34 | (N : ℕ) (hN : 3 ≤ N) (k : ℕ) (hk : 0 < k) |
| 35 | (hpow : (1 + (N : ℂ) * a) ^ k = 1) : a = 0 := by |
| 36 | let K := IntermediateField.adjoin ℚ {a} |
| 37 | let : NumberField K := |
| 38 | { to_charZero := K.charZero |
| 39 | to_finiteDimensional := IntermediateField.adjoin.finiteDimensional ha.tower_top } |
| 40 | let α : K := ⟨a, IntermediateField.mem_adjoin_simple_self ℚ a⟩ |
| 41 | have hi : IsIntegral ℤ α := IntermediateField.coe_isIntegral_iff.mp ha |
| 42 | have hp : (1 + (N : K) * α) ^ k = 1 := by |
| 43 | apply Subtype.ext |
| 44 | exact hpow |
| 45 | have hz := integral_root_of_unity_congruence α hi N hN k hk hp |
| 46 | exact congrArg (fun x : K => (x : ℂ)) hz |
| 47 | |
| 48 | /-- The eigenvalue argument for congruence torsion, before choosing an integral basis. -/ |
| 49 | theorem integral_spectrum_congruence_torsion |
| 50 | {V : Type*} [AddCommGroup V] [Module ℂ V] [FiniteDimensional ℂ V] |
| 51 | (a : Module.End ℂ V) |
| 52 | (ha : ∀ z : ℂ, a.HasEigenvalue z → IsIntegral ℤ z) |
| 53 | (N : ℕ) (hN : 3 ≤ N) (k : ℕ) (hk : 0 < k) |
| 54 | (hpow : (1 + (N : ℂ) • a) ^ k = 1) : a = 0 := by |
| 55 | let f : Module.End ℂ V := 1 + (N : ℂ) • a |
| 56 | have hNk : (N : ℂ) ≠ 0 := by exact_mod_cast (show N ≠ 0 by omega) |
| 57 | have hkC : (k : ℂ) ≠ 0 := by exact_mod_cast hk.ne' |
| 58 | have hf : f.IsSemisimple := by |
| 59 | apply Module.End.isSemisimple_of_squarefree_aeval_eq_zero |
| 60 | (p := Polynomial.X ^ k - Polynomial.C (1 : ℂ)) |
| 61 | · exact (Polynomial.separable_X_pow_sub_C 1 hkC one_ne_zero).squarefree |
| 62 | · simpa only [map_sub, map_pow, Polynomial.aeval_X, Polynomial.aeval_C, |
| 63 | map_one, sub_eq_zero] using hpow |
| 64 | have has : a.IsSemisimple := by |
| 65 | have h := hf.aeval (Polynomial.C ((N : ℂ)⁻¹) * (Polynomial.X - 1)) |
| 66 | have he : Polynomial.aeval f |
| 67 | (Polynomial.C ((N : ℂ)⁻¹) * (Polynomial.X - 1)) = a := by |
| 68 | simp only [map_mul, map_sub, map_one, Polynomial.aeval_C, Polynomial.aeval_X] |
| 69 | change ((N : ℂ)⁻¹) • ((1 + (N : ℂ) • a) - 1) = a |
| 70 | rw [add_sub_cancel_left, smul_smul, inv_mul_cancel₀ hNk, one_smul] |
| 71 | rwa [he] at h |
| 72 | apply has.eq_zero_iff_forall_eigenvalue.mpr |
| 73 | intro z hz |
| 74 | apply complex_integral_root_of_unity_congruence z (ha z hz) N hN k hk |
| 75 | obtain ⟨v, hv⟩ := hz.exists_hasEigenvector |
| 76 | have hfv : f.HasEigenvector (1 + (N : ℂ) * z) v := by |
| 77 | refine ⟨Module.End.mem_eigenspace_iff.mpr ?_, hv.2⟩ |
| 78 | change v + (N : ℂ) • a v = (1 + (N : ℂ) * z) • v |
| 79 | rw [hv.apply_eq_smul, add_smul, one_smul, mul_smul] |
| 80 | have h := hfv.pow_apply k |
| 81 | change ((1 + (N : ℂ) • a) ^ k) v = (1 + (N : ℂ) * z) ^ k • v at h |
| 82 | rw [hpow, Module.End.one_apply] at h |
| 83 | exact (smul_left_injective ℂ hv.2) (h.symm.trans (one_smul ℂ v).symm) |
| 84 | |
| 85 | /-- Principal level at any integer N ≥ 3 contains no nonidentity finite-order |
| 86 | integer matrix. No Hermitian signature or special-unitary condition is needed. -/ |
| 87 | theorem integer_matrix_congruence_torsion |
| 88 | {ι : Type*} [Fintype ι] [DecidableEq ι] |
| 89 | (B : Matrix ι ι ℤ) (N : ℕ) (hN : 3 ≤ N) |
| 90 | (k : ℕ) (hk : 0 < k) (hpow : (1 + N • B) ^ k = 1) : B = 0 := by |
| 91 | let a : Module.End ℂ (ι → ℂ) := Matrix.toLin' (B.map (Int.castRingHom ℂ)) |
| 92 | have ha : ∀ z : ℂ, a.HasEigenvalue z → IsIntegral ℤ z := by |
| 93 | intro z hz |
| 94 | have hr := (Module.End.hasEigenvalue_iff_isRoot_charpoly a z).mp hz |
| 95 | change (Matrix.toLin' (B.map (Int.castRingHom ℂ))).charpoly.IsRoot z at hr |
| 96 | rw [Matrix.charpoly_toLin', Matrix.charpoly_map] at hr |
| 97 | refine ⟨B.charpoly, B.charpoly_monic, ?_⟩ |
| 98 | have he : Int.castRingHom ℂ = algebraMap ℤ ℂ := by ext n; simp |
| 99 | simpa only [Polynomial.IsRoot, Polynomial.eval_map, Polynomial.aeval_def, he] using hr |
| 100 | have hp : (1 + (N : ℂ) • a) ^ k = 1 := by |
| 101 | let F : Matrix ι ι ℤ →+* Module.End ℂ (ι → ℂ) := |
| 102 | Matrix.toLinAlgEquiv'.toRingHom.comp (Int.castRingHom ℂ).mapMatrix |
| 103 | have h := congrArg F hpow |
| 104 | simp only [map_pow, map_add, map_one, map_nsmul] at h |
| 105 | change (1 + N • a) ^ k = 1 at h |
| 106 | simpa only [Nat.cast_smul_eq_nsmul] using h |
| 107 | have hz := integral_spectrum_congruence_torsion a ha N hN k hk hp |
| 108 | have hB : B.map (Int.castRingHom ℂ) = 0 := by |
| 109 | apply Matrix.toLin'.injective |
| 110 | exact hz.trans (map_zero _).symm |
| 111 | ext i j |
| 112 | have h := congrArg (fun M : Matrix ι ι ℂ => M i j) hB |
| 113 | change (B i j : ℂ) = 0 at h |
| 114 | exact_mod_cast h |
| 115 | |
| 116 | theorem finite_lattice_congruence_torsion |
| 117 | {M : Type*} [AddCommGroup M] [Module ℤ M] |
| 118 | [Module.Finite ℤ M] [Module.IsTorsionFree ℤ M] |
| 119 | (f : Module.End ℤ M) (N : ℕ) (hN : 3 ≤ N) |
| 120 | (hcong : ∀ x : M, ∃ y : M, f x - x = N • y) |
| 121 | (k : ℕ) (hk : 0 < k) (hpow : f ^ k = 1) : f = 1 := by |
| 122 | let b := Module.Free.chooseBasis ℤ M |
| 123 | let ι := Module.Free.ChooseBasisIndex ℤ M |
| 124 | let A : Matrix ι ι ℤ := LinearMap.toMatrix b b f |
| 125 | choose y hy using (fun j : ι => hcong (b j)) |
| 126 | let B : Matrix ι ι ℤ := fun i j => b.repr (y j) i |
| 127 | have hA : A = 1 + N • B := by |
| 128 | ext i j |
| 129 | have h := congrArg (fun x : M => b.repr x i) (hy j) |
| 130 | change b.repr (f (b j) - b j) i = b.repr (N • y j) i at h |
| 131 | simp only [map_sub, Finsupp.sub_apply, map_nsmul, Finsupp.smul_apply, |
| 132 | b.repr_self, Finsupp.single_apply] at h |
| 133 | simp only [A, LinearMap.toMatrix_apply, Matrix.add_apply, Matrix.one_apply, Matrix.smul_apply] |
| 134 | change b.repr (f (b j)) i = (if i = j then 1 else 0) + N • b.repr (y j) i |
| 135 | simpa only [eq_comm, nsmul_eq_mul, add_comm] using eq_add_of_sub_eq h |
| 136 | have hp : A ^ k = 1 := by |
| 137 | change (LinearMap.toMatrix b b f) ^ k = 1 |
| 138 | rw [LinearMap.toMatrix_pow, hpow] |
| 139 | exact LinearMap.toMatrix_one b |
| 140 | have hB : B = 0 := integer_matrix_congruence_torsion B N hN k hk (hA ▸ hp) |
| 141 | have hf : LinearMap.toMatrix b b f = LinearMap.toMatrix b b (1 : Module.End ℤ M) := by |
| 142 | rw [← show A = LinearMap.toMatrix b b f from rfl, hA, hB] |
| 143 | simp |
| 144 | exact (LinearMap.toMatrix b b).injective hf |
| 145 | |
| 146 | end |
| 147 | |
| 148 | end OAI.NumberTheory.ArithmeticGroups.Congruence.Level |