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.RepresentationTheory.Hecke.CosetCalculusArithmeticMeasure |
| 2 | |
| 3 | /-! # Double Coset -/ |
| 4 | |
| 5 | namespace OAI.RepresentationTheory.Hecke.DoubleCoset.Calculus |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | section |
| 10 | |
| 11 | /-! Matrix characterization of the first minuscule double coset over a DVR. -/ |
| 12 | |
| 13 | open scoped BigOperators |
| 14 | |
| 15 | variable {R F : Type*} [CommRing R] [IsDomain R] [IsDiscreteValuationRing R] |
| 16 | [Field F] [Algebra R F] [IsFractionRing R F] |
| 17 | |
| 18 | def InDoubleCoset (π : R) (a : Fin 3 → ℤ) (M : CosetCalculusArithmeticMeasure.Mat F) : Prop := |
| 19 | ∃ U V : Matrix.GeneralLinearGroup (Fin 3) R, |
| 20 | M = U.val.map (algebraMap R F) * |
| 21 | Matrix.diagonal (fun i => (algebraMap R F π) ^ a i) * |
| 22 | V.val.map (algebraMap R F) |
| 23 | |
| 24 | def FirstCondition (π : R) (M : CosetCalculusArithmeticMeasure.Mat F) : Prop := |
| 25 | CosetCalculusArithmeticMeasure.IntegralMatrix (R := R) M ∧ |
| 26 | ∃ u : Rˣ, M.det = algebraMap R F (u : R) * algebraMap R F π |
| 27 | |
| 28 | omit [IsDomain R] [IsDiscreteValuationRing R] [IsFractionRing R F] in |
| 29 | lemma integral_of_factorization_iff |
| 30 | (U V : Matrix.GeneralLinearGroup (Fin 3) R) (D M : CosetCalculusArithmeticMeasure.Mat F) |
| 31 | (h : M = U.val.map (algebraMap R F) * D * V.val.map (algebraMap R F)) : |
| 32 | CosetCalculusArithmeticMeasure.IntegralMatrix (R := R) M ↔ CosetCalculusArithmeticMeasure.IntegralMatrix (R := R) D := by |
| 33 | let f : CosetCalculusArithmeticMeasure.Mat R →+* CosetCalculusArithmeticMeasure.Mat F := (algebraMap R F).mapMatrix |
| 34 | have hU : f (↑U⁻¹) * f U.val = 1 := by rw [← map_mul]; simp |
| 35 | have hV : f V.val * f (↑V⁻¹) = 1 := by rw [← map_mul]; simp |
| 36 | have h' : M = f U.val * D * f V.val := h |
| 37 | constructor |
| 38 | · intro hM |
| 39 | have he : f (↑U⁻¹) * M * f (↑V⁻¹) = D := by |
| 40 | rw [h'] |
| 41 | calc |
| 42 | _ = (f (↑U⁻¹) * f U.val) * D * (f V.val * f (↑V⁻¹)) := by |
| 43 | simp only [mul_assoc] |
| 44 | _ = D := by rw [hU, hV, one_mul, mul_one] |
| 45 | rw [← he] |
| 46 | exact f.range.mul_mem (f.range.mul_mem ⟨↑U⁻¹, rfl⟩ hM) ⟨↑V⁻¹, rfl⟩ |
| 47 | · intro hD |
| 48 | rw [h'] |
| 49 | exact f.range.mul_mem (f.range.mul_mem ⟨U.val, rfl⟩ hD) ⟨V.val, rfl⟩ |
| 50 | |
| 51 | omit [IsDomain R] [IsDiscreteValuationRing R] in |
| 52 | lemma integral_diagonal_iff (π : R) (hπ : Irreducible π) (a : Fin 3 → ℤ) : |
| 53 | CosetCalculusArithmeticMeasure.IntegralMatrix (R := R) (Matrix.diagonal (fun i => (algebraMap R F π) ^ a i)) ↔ |
| 54 | ∀ i, 0 ≤ a i := by |
| 55 | rw [CosetCalculusArithmeticMeasure.integralMatrix_iff] |
| 56 | constructor |
| 57 | · intro h i |
| 58 | exact (CosetCalculusArithmeticMeasure.integral_zpow π hπ (a i)).mp (by simpa using h i i) |
| 59 | · intro h i j |
| 60 | by_cases hij : i = j |
| 61 | · subst j |
| 62 | simpa using (CosetCalculusArithmeticMeasure.integral_zpow π hπ (a i)).mpr (h i) |
| 63 | · simpa [Matrix.diagonal_apply_ne _ hij] using |
| 64 | (show CosetCalculusArithmeticMeasure.IntegralElement (R := R) (0 : F) from ⟨0, map_zero _⟩) |
| 65 | |
| 66 | omit [IsDomain R] [IsDiscreteValuationRing R] in |
| 67 | lemma factorization_det (π : R) (hπ : Irreducible π) (a : Fin 3 → ℤ) |
| 68 | (U V : Matrix.GeneralLinearGroup (Fin 3) R) (M : CosetCalculusArithmeticMeasure.Mat F) |
| 69 | (h : M = U.val.map (algebraMap R F) * |
| 70 | Matrix.diagonal (fun i => (algebraMap R F π) ^ a i) * |
| 71 | V.val.map (algebraMap R F)) : |
| 72 | M.det = algebraMap R F (↑(U.det * V.det) : R) * |
| 73 | (algebraMap R F π) ^ (a 0 + a 1 + a 2) := by |
| 74 | have hp := OAI.Algebra.Modules.ElementaryDivisorsExistenceLinear.Construction.uniformizer_map_ne_zero (K := F) hπ |
| 75 | have hmap (B : CosetCalculusArithmeticMeasure.Mat R) : (B.map (algebraMap R F)).det = algebraMap R F B.det := |
| 76 | ((algebraMap R F).map_det B).symm |
| 77 | rw [h, Matrix.det_mul, Matrix.det_mul, Matrix.det_diagonal] |
| 78 | rw [hmap, hmap] |
| 79 | simp only [Fin.prod_univ_succ, Fin.isValue, |
| 80 | Units.val_mul, map_mul, zpow_add₀ hp] |
| 81 | change algebraMap R F U.val.det * |
| 82 | ((algebraMap R F π) ^ a 0 * ((algebraMap R F π) ^ a 1 * |
| 83 | ((algebraMap R F π) ^ a 2 * 1))) * algebraMap R F V.val.det = |
| 84 | (algebraMap R F U.val.det * algebraMap R F V.val.det) * |
| 85 | ((algebraMap R F π) ^ a 0 * (algebraMap R F π) ^ a 1 * (algebraMap R F π) ^ a 2) |
| 86 | ring |
| 87 | |
| 88 | theorem firstCondition_iff_doubleCoset (π : R) (hπ : Irreducible π) (M : CosetCalculusArithmeticMeasure.Mat F) : |
| 89 | FirstCondition π M ↔ InDoubleCoset π ![0, 0, 1] M := by |
| 90 | have hp := OAI.Algebra.Modules.ElementaryDivisorsExistenceLinear.Construction.uniformizer_map_ne_zero (K := F) hπ |
| 91 | constructor |
| 92 | · rintro ⟨hM, u, hu⟩ |
| 93 | have hdet : M.det ≠ 0 := by |
| 94 | rw [hu] |
| 95 | exact mul_ne_zero (u.isUnit.map (algebraMap R F)).ne_zero hp |
| 96 | let g := Matrix.GeneralLinearGroup.mkOfDetNeZero M hdet |
| 97 | obtain ⟨a, ⟨ha, U, V, h⟩, _⟩ := OAI.Algebra.Modules.ElementaryDivisorsExistenceLinear.Construction.gl3_smith_normal_form π hπ g |
| 98 | have h' : M = U.val.map (algebraMap R F) * |
| 99 | Matrix.diagonal (fun i => (algebraMap R F π) ^ a i) * |
| 100 | V.val.map (algebraMap R F) := h |
| 101 | have hnon : ∀ i, 0 ≤ a i := (integral_diagonal_iff π hπ a).mp |
| 102 | ((integral_of_factorization_iff U V _ M h').mp hM) |
| 103 | have hd := factorization_det π hπ a U V M h' |
| 104 | have he : algebraMap R F (↑(U.det * V.det) : R) * |
| 105 | (algebraMap R F π) ^ (a 0 + a 1 + a 2) = |
| 106 | algebraMap R F (u : R) * (algebraMap R F π) ^ (1 : ℤ) := by |
| 107 | simpa only [zpow_one] using hd.symm.trans hu |
| 108 | have hs₁ := OAI.Algebra.Modules.ElementaryDivisorsExistenceLinear.Construction.exponent_le_of_unit_coefficient hπ |
| 109 | (U.det * V.det).isUnit he |
| 110 | have hs₂ := OAI.Algebra.Modules.ElementaryDivisorsExistenceLinear.Construction.exponent_le_of_unit_coefficient hπ u.isUnit he.symm |
| 111 | have h01 := ha (show (0 : Fin 3) ≤ 1 by decide) |
| 112 | have h12 := ha (show (1 : Fin 3) ≤ 2 by decide) |
| 113 | have hn0 := hnon 0 |
| 114 | have hn1 := hnon 1 |
| 115 | have hn2 := hnon 2 |
| 116 | have heq : a = ![0, 0, 1] := by |
| 117 | have hc : a 0 = 0 ∧ a 1 = 0 ∧ a 2 = 1 := by omega |
| 118 | ext i |
| 119 | fin_cases i <;> simp [hc] |
| 120 | subst a |
| 121 | exact ⟨U, V, h'⟩ |
| 122 | · rintro ⟨U, V, h⟩ |
| 123 | refine ⟨(integral_of_factorization_iff U V _ M h).mpr ?_, U.det * V.det, ?_⟩ |
| 124 | · apply (integral_diagonal_iff π hπ _).mpr |
| 125 | intro i |
| 126 | fin_cases i <;> norm_num |
| 127 | · simpa using factorization_det π hπ ![0, 0, 1] U V M h |
| 128 | |
| 129 | end |
| 130 | |
| 131 | /-! Integral permutation matrices reconcile the two choices of dominant order. -/ |
| 132 | |
| 133 | open scoped BigOperators |
| 134 | |
| 135 | def reverseIntegralGL (R : Type*) [CommRing R] : Matrix.GeneralLinearGroup (Fin 3) R where |
| 136 | val := !![0, 0, 1; 0, 1, 0; 1, 0, 0] |
| 137 | inv := !![0, 0, 1; 0, 1, 0; 1, 0, 0] |
| 138 | val_inv := by ext i j; fin_cases i <;> fin_cases j <;> simp [Matrix.mul_apply, Fin.sum_univ_succ] |
| 139 | inv_val := by ext i j; fin_cases i <;> fin_cases j <;> simp [Matrix.mul_apply, Fin.sum_univ_succ] |
| 140 | |
| 141 | variable {R F : Type*} [CommRing R] [Field F] [Algebra R F] |
| 142 | |
| 143 | lemma reverse_conjugation (b : Fin 3 → F) : |
| 144 | (reverseIntegralGL R).val.map (algebraMap R F) * Matrix.diagonal b * |
| 145 | (reverseIntegralGL R).val.map (algebraMap R F) = Matrix.diagonal ![b 2, b 1, b 0] := by |
| 146 | ext i j |
| 147 | fin_cases i <;> fin_cases j <;> |
| 148 | simp [reverseIntegralGL, Matrix.mul_apply, Fin.sum_univ_succ, Matrix.diagonal_apply] |
| 149 | |
| 150 | lemma inDoubleCoset_reverse (π : R) (a : Fin 3 → ℤ) (M : CosetCalculusArithmeticMeasure.Mat F) |
| 151 | (h : InDoubleCoset π a M) : InDoubleCoset π ![a 2, a 1, a 0] M := by |
| 152 | obtain ⟨U, V, h⟩ := h |
| 153 | refine ⟨U * reverseIntegralGL R, reverseIntegralGL R * V, ?_⟩ |
| 154 | have hd : (reverseIntegralGL R).val.map (algebraMap R F) * |
| 155 | Matrix.diagonal (fun i => (algebraMap R F π) ^ (![a 2, a 1, a 0] : Fin 3 → ℤ) i) * |
| 156 | (reverseIntegralGL R).val.map (algebraMap R F) = |
| 157 | Matrix.diagonal (fun i => (algebraMap R F π) ^ a i) := by |
| 158 | rw [reverse_conjugation] |
| 159 | congr 1 |
| 160 | ext i |
| 161 | fin_cases i <;> rfl |
| 162 | change M = (U.val * (reverseIntegralGL R).val).map (algebraMap R F) * _ * |
| 163 | ((reverseIntegralGL R).val * V.val).map (algebraMap R F) |
| 164 | rw [Matrix.map_mul, Matrix.map_mul] |
| 165 | calc |
| 166 | M = U.val.map (algebraMap R F) * |
| 167 | Matrix.diagonal (fun i => (algebraMap R F π) ^ a i) * V.val.map (algebraMap R F) := h |
| 168 | _ = _ := by rw [← hd]; simp only [mul_assoc] |
| 169 | |
| 170 | lemma first_doubleCoset_reversal (π : R) (M : CosetCalculusArithmeticMeasure.Mat F) : |
| 171 | InDoubleCoset π ![1, 0, 0] M ↔ InDoubleCoset π ![0, 0, 1] M := by |
| 172 | constructor |
| 173 | · intro h |
| 174 | exact inDoubleCoset_reverse π ![1, 0, 0] M h |
| 175 | · intro h |
| 176 | exact inDoubleCoset_reverse π ![0, 0, 1] M h |
| 177 | |
| 178 | end |
| 179 | |
| 180 | end OAI.RepresentationTheory.Hecke.DoubleCoset.Calculus |