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 | /-! # Reduction -/ |
| 4 | |
| 5 | namespace OAI.RepresentationTheory.Satake.Reduction.GeneralLinear |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | /-! Integral column operations for the GL₃ Iwasawa decomposition. -/ |
| 10 | |
| 11 | open scoped Classical |
| 12 | |
| 13 | open _root_.Matrix ValuativeRel |
| 14 | |
| 15 | variable {F : Type*} [Field F] [ValuativeRel F] |
| 16 | |
| 17 | abbrev O (F : Type*) [Field F] [ValuativeRel F] := (valuation F).integer |
| 18 | abbrev GL3 (R : Type*) [CommRing R] := Matrix.GeneralLinearGroup (Fin 3) R |
| 19 | |
| 20 | def integralMap : GL3 (O F) →* GL3 F := |
| 21 | Matrix.GeneralLinearGroup.map (valuation F).integer.subtype |
| 22 | |
| 23 | def permutation (σ : Equiv.Perm (Fin 3)) : GL3 (O F) := |
| 24 | (Matrix.permMatrixHom : Equiv.Perm (Fin 3) →* Matrix (Fin 3) (Fin 3) (O F)).toHomUnits σ |
| 25 | |
| 26 | theorem integral_permutation_val (σ : Equiv.Perm (Fin 3)) : |
| 27 | (integralMap (permutation (F := F) σ)).val = (σ⁻¹).permMatrix F := by |
| 28 | ext i j |
| 29 | change (((σ⁻¹).permMatrix (O F) i j : O F) : F) = (σ⁻¹).permMatrix F i j |
| 30 | simp [Equiv.Perm.permMatrix, PEquiv.toMatrix_apply] |
| 31 | split_ifs <;> rfl |
| 32 | |
| 33 | theorem mul_permutation_apply (g : GL3 F) (σ : Equiv.Perm (Fin 3)) (i j : Fin 3) : |
| 34 | (g * integralMap (permutation (F := F) σ)) i j = g i (σ j) := by |
| 35 | change (g.val * (integralMap (permutation (F := F) σ)).val) i j = _ |
| 36 | rw [integral_permutation_val] |
| 37 | change (g.val i ᵥ* (σ⁻¹).permMatrix F) j = _ |
| 38 | rw [Matrix.vecMul_permMatrix] |
| 39 | rfl |
| 40 | |
| 41 | def lowerShear (a b : O F) : GL3 (O F) where |
| 42 | val := !![1, 0, 0; 0, 1, 0; a, b, 1] |
| 43 | inv := !![1, 0, 0; 0, 1, 0; -a, -b, 1] |
| 44 | val_inv := by ext i j; fin_cases i <;> fin_cases j <;> simp [Matrix.mul_apply, Fin.sum_univ_three] |
| 45 | inv_val := by ext i j; fin_cases i <;> fin_cases j <;> simp [Matrix.mul_apply, Fin.sum_univ_three] |
| 46 | |
| 47 | def middleShear (a : O F) : GL3 (O F) where |
| 48 | val := !![1, 0, 0; a, 1, 0; 0, 0, 1] |
| 49 | inv := !![1, 0, 0; -a, 1, 0; 0, 0, 1] |
| 50 | val_inv := by ext i j; fin_cases i <;> fin_cases j <;> simp [Matrix.mul_apply, Fin.sum_univ_three] |
| 51 | inv_val := by ext i j; fin_cases i <;> fin_cases j <;> simp [Matrix.mul_apply, Fin.sum_univ_three] |
| 52 | |
| 53 | theorem mul_lowerShear_apply (g : GL3 F) (a b : O F) (i : Fin 3) : |
| 54 | (g * integralMap (lowerShear a b)) i 0 = g i 0 + g i 2 * (a : F) ∧ |
| 55 | (g * integralMap (lowerShear a b)) i 1 = g i 1 + g i 2 * (b : F) ∧ |
| 56 | (g * integralMap (lowerShear a b)) i 2 = g i 2 := by |
| 57 | simp [integralMap, lowerShear, Matrix.mul_apply, Fin.sum_univ_three] |
| 58 | |
| 59 | theorem mul_middleShear_apply (g : GL3 F) (a : O F) (i : Fin 3) : |
| 60 | (g * integralMap (middleShear a)) i 0 = g i 0 + g i 1 * (a : F) ∧ |
| 61 | (g * integralMap (middleShear a)) i 1 = g i 1 ∧ |
| 62 | (g * integralMap (middleShear a)) i 2 = g i 2 := by |
| 63 | simp [integralMap, middleShear, Matrix.mul_apply, Fin.sum_univ_three] |
| 64 | |
| 65 | theorem exists_row_pivot (g : GL3 F) (i : Fin 3) : |
| 66 | ∃ j : Fin 3, g i j ≠ 0 ∧ ∀ k, valuation F (g i k) ≤ valuation F (g i j) := by |
| 67 | have hrow : ∃ j : Fin 3, g i j ≠ 0 := by |
| 68 | by_contra! h |
| 69 | have hi := congrArg (fun A : Matrix (Fin 3) (Fin 3) F => A i i) g.val_inv |
| 70 | simp [Matrix.mul_apply, h] at hi |
| 71 | obtain ⟨j, _, hj⟩ := Finset.exists_max_image Finset.univ |
| 72 | (fun j : Fin 3 => valuation F (g i j)) Finset.univ_nonempty |
| 73 | refine ⟨j, ?_, fun k => hj k (Finset.mem_univ k)⟩ |
| 74 | intro hz |
| 75 | obtain ⟨k, hk⟩ := hrow |
| 76 | have h := hj k (Finset.mem_univ k) |
| 77 | rw [hz, map_zero] at h |
| 78 | exact hk ((valuation F).zero_iff.mp (le_zero_iff.mp h)) |
| 79 | |
| 80 | /-- The coefficient for eliminating an entry against a largest-valued pivot |
| 81 | belongs to the valuation ring. -/ |
| 82 | def eliminationCoefficient (x p : F) (hp : p ≠ 0) |
| 83 | (hxp : valuation F x ≤ valuation F p) : O F := |
| 84 | ⟨-(x / p), by |
| 85 | change valuation F (-(x / p)) ≤ 1 |
| 86 | rw [Valuation.map_neg, map_div₀] |
| 87 | exact (div_le_one₀ ((valuation F).pos_iff.mpr hp)).mpr hxp⟩ |
| 88 | |
| 89 | theorem eliminate_entry (x p : F) (hp : p ≠ 0) |
| 90 | (hxp : valuation F x ≤ valuation F p) : |
| 91 | x + p * (eliminationCoefficient x p hp hxp : F) = 0 := by |
| 92 | change x + p * (-(x / p)) = 0 |
| 93 | field_simp |
| 94 | ring |
| 95 | |
| 96 | /-- Integral column operations clear the first two entries of the last row. -/ |
| 97 | theorem reduce_last_row (g : GL3 F) : |
| 98 | ∃ U : GL3 (O F), |
| 99 | (g * integralMap U) 2 0 = 0 ∧ |
| 100 | (g * integralMap U) 2 1 = 0 ∧ |
| 101 | (g * integralMap U) 2 2 ≠ 0 := by |
| 102 | obtain ⟨j, hj, hmax⟩ := exists_row_pivot g 2 |
| 103 | let P := permutation (F := F) (Equiv.swap j 2) |
| 104 | let g' := g * integralMap P |
| 105 | have hp : g' 2 2 ≠ 0 := by |
| 106 | simpa only [g', P, mul_permutation_apply, Equiv.swap_apply_right] using hj |
| 107 | have hm (k : Fin 3) : valuation F (g' 2 k) ≤ valuation F (g' 2 2) := by |
| 108 | simpa only [g', P, mul_permutation_apply, Equiv.swap_apply_right] using |
| 109 | hmax (Equiv.swap j 2 k) |
| 110 | let a := eliminationCoefficient (g' 2 0) (g' 2 2) hp (hm 0) |
| 111 | let b := eliminationCoefficient (g' 2 1) (g' 2 2) hp (hm 1) |
| 112 | refine ⟨P * lowerShear a b, ?_⟩ |
| 113 | rw [map_mul, ← mul_assoc] |
| 114 | change (g' * integralMap (lowerShear a b)) 2 0 = 0 ∧ |
| 115 | (g' * integralMap (lowerShear a b)) 2 1 = 0 ∧ |
| 116 | (g' * integralMap (lowerShear a b)) 2 2 ≠ 0 |
| 117 | obtain ⟨h0, h1, h2⟩ := mul_lowerShear_apply g' a b 2 |
| 118 | rw [h0, h1, h2] |
| 119 | exact ⟨eliminate_entry _ _ hp (hm 0), eliminate_entry _ _ hp (hm 1), hp⟩ |
| 120 | |
| 121 | /-- The remaining two-dimensional elimination preserves the cleared last row. -/ |
| 122 | theorem reduce_second_row (g : GL3 F) (h20 : g 2 0 = 0) (h21 : g 2 1 = 0) : |
| 123 | ∃ U : GL3 (O F), |
| 124 | (g * integralMap U) 1 0 = 0 ∧ |
| 125 | (g * integralMap U) 2 0 = 0 ∧ |
| 126 | (g * integralMap U) 2 1 = 0 := by |
| 127 | have hpair : ∃ k ∈ ({0, 1} : Finset (Fin 3)), g 1 k ≠ 0 := by |
| 128 | by_contra! h |
| 129 | have h10 := h 0 (by simp) |
| 130 | have h11 := h 1 (by simp) |
| 131 | apply g.det_ne_zero |
| 132 | simp [Matrix.det_fin_three, h20, h21, h10, h11] |
| 133 | obtain ⟨j, hj, hmax⟩ := Finset.exists_max_image ({0, 1} : Finset (Fin 3)) |
| 134 | (fun j => valuation F (g 1 j)) (by simp) |
| 135 | have hj01 : j = 0 ∨ j = 1 := by simpa using hj |
| 136 | have hjnz : g 1 j ≠ 0 := by |
| 137 | intro hz |
| 138 | obtain ⟨k, hk, hknz⟩ := hpair |
| 139 | have h := hmax k hk |
| 140 | rw [hz, map_zero] at h |
| 141 | exact hknz ((valuation F).zero_iff.mp (le_zero_iff.mp h)) |
| 142 | let P := permutation (F := F) (Equiv.swap j 1) |
| 143 | let g' := g * integralMap P |
| 144 | have hp : g' 1 1 ≠ 0 := by |
| 145 | simpa only [g', P, mul_permutation_apply, Equiv.swap_apply_right] using hjnz |
| 146 | have hm : valuation F (g' 1 0) ≤ valuation F (g' 1 1) := by |
| 147 | have hmem : Equiv.swap j 1 0 ∈ ({0, 1} : Finset (Fin 3)) := by |
| 148 | rcases hj01 with rfl | rfl <;> simp |
| 149 | simpa only [g', P, mul_permutation_apply, Equiv.swap_apply_right] using |
| 150 | hmax (Equiv.swap j 1 0) hmem |
| 151 | have hg20 : g' 2 0 = 0 := by |
| 152 | change (g * integralMap (permutation (F := F) (Equiv.swap j 1))) 2 0 = 0 |
| 153 | rw [mul_permutation_apply] |
| 154 | rcases hj01 with rfl | rfl <;> simp [h20, h21] |
| 155 | have hg21 : g' 2 1 = 0 := by |
| 156 | change (g * integralMap (permutation (F := F) (Equiv.swap j 1))) 2 1 = 0 |
| 157 | rw [mul_permutation_apply, Equiv.swap_apply_right] |
| 158 | rcases hj01 with rfl | rfl |
| 159 | · exact h20 |
| 160 | · exact h21 |
| 161 | let a := eliminationCoefficient (g' 1 0) (g' 1 1) hp hm |
| 162 | refine ⟨P * middleShear a, ?_⟩ |
| 163 | rw [map_mul, ← mul_assoc] |
| 164 | change (g' * integralMap (middleShear a)) 1 0 = 0 ∧ |
| 165 | (g' * integralMap (middleShear a)) 2 0 = 0 ∧ |
| 166 | (g' * integralMap (middleShear a)) 2 1 = 0 |
| 167 | obtain ⟨h10, _, _⟩ := mul_middleShear_apply g' a 1 |
| 168 | obtain ⟨h20', h21', _⟩ := mul_middleShear_apply g' a 2 |
| 169 | rw [h10, h20', h21', hg20, hg21] |
| 170 | exact ⟨eliminate_entry _ _ hp hm, by simp, rfl⟩ |
| 171 | |
| 172 | omit [ValuativeRel F] in |
| 173 | theorem upperTriangular_of_below_zero (g : GL3 F) |
| 174 | (h10 : g 1 0 = 0) (h20 : g 2 0 = 0) (h21 : g 2 1 = 0) : |
| 175 | g.val.IsUpperTriangular := by |
| 176 | intro i j hij |
| 177 | fin_cases i <;> fin_cases j <;> simp_all |
| 178 | |
| 179 | /-- GL₃ over a valued field admits an upper-triangular representative |
| 180 | after right multiplication by an invertible integral matrix. -/ |
| 181 | theorem exists_integral_upperTriangular (g : GL3 F) : |
| 182 | ∃ U : GL3 (O F), (g * integralMap U).val.IsUpperTriangular := by |
| 183 | obtain ⟨U, h20, h21, _⟩ := reduce_last_row g |
| 184 | obtain ⟨V, h10', h20', h21'⟩ := reduce_second_row (g * integralMap U) h20 h21 |
| 185 | refine ⟨U * V, ?_⟩ |
| 186 | rw [map_mul, ← mul_assoc] |
| 187 | exact upperTriangular_of_below_zero _ h10' h20' h21' |
| 188 | |
| 189 | end |
| 190 | |
| 191 | end OAI.RepresentationTheory.Satake.Reduction.GeneralLinear |