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 | /-! # Matrix Flat Extension -/ |
| 4 | |
| 5 | namespace OAI.NumberTheory.ArithmeticGroups.Lattices.MatrixFlatExtension.Construction |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | section |
| 10 | |
| 11 | /-! Extension of scalars commutes with intersections of vector |
| 12 | subspaces. -/ |
| 13 | |
| 14 | open scoped Classical TensorProduct |
| 15 | |
| 16 | variable {k K V W U : Type*} [Field k] [Field K] [Algebra k K] |
| 17 | [AddCommGroup V] [Module k V] [AddCommGroup W] [Module k W] |
| 18 | [AddCommGroup U] [Module k U] |
| 19 | |
| 20 | theorem submodule_baseChange_ker (f : V →ₗ[k] W) : |
| 21 | (f.ker).baseChange K = (f.baseChange K).ker := by |
| 22 | exact (Module.Flat.ker_lTensor_eq (S := K) K f).symm |
| 23 | |
| 24 | theorem baseChange_prod_apply (f : V →ₗ[k] W) (g : V →ₗ[k] U) (x : K ⊗[k] V) : |
| 25 | TensorProduct.prodRight k K K W U ((f.prod g).baseChange K x) = |
| 26 | (f.baseChange K x, g.baseChange K x) := by |
| 27 | induction x using TensorProduct.inductionOn with |
| 28 | | tmul a v => simp |
| 29 | | add x y hx hy => simp [hx, hy] |
| 30 | |
| 31 | theorem baseChange_prod_ker (f : V →ₗ[k] W) (g : V →ₗ[k] U) : |
| 32 | ((f.prod g).baseChange K).ker = (f.baseChange K).ker ⊓ (g.baseChange K).ker := by |
| 33 | ext x |
| 34 | change ((f.prod g).baseChange K x = 0) ↔ f.baseChange K x = 0 ∧ g.baseChange K x = 0 |
| 35 | rw [← (TensorProduct.prodRight k K K W U).injective.eq_iff, map_zero, baseChange_prod_apply] |
| 36 | constructor |
| 37 | · intro h |
| 38 | exact ⟨congrArg Prod.fst h, congrArg Prod.snd h⟩ |
| 39 | · rintro ⟨h₁, h₂⟩ |
| 40 | exact Prod.ext h₁ h₂ |
| 41 | |
| 42 | theorem submodule_baseChange_inf (P Q : Submodule k V) : |
| 43 | (P ⊓ Q).baseChange K = P.baseChange K ⊓ Q.baseChange K := by |
| 44 | have hker : (P.mkQ.prod Q.mkQ).ker = P ⊓ Q := by |
| 45 | rw [LinearMap.ker_prod, P.ker_mkQ, Q.ker_mkQ] |
| 46 | rw [← hker, submodule_baseChange_ker, baseChange_prod_ker, |
| 47 | ← submodule_baseChange_ker, ← submodule_baseChange_ker, P.ker_mkQ, Q.ker_mkQ] |
| 48 | |
| 49 | end |
| 50 | |
| 51 | section |
| 52 | |
| 53 | /-! The concrete identification of scalar-extended matrix spaces. -/ |
| 54 | |
| 55 | open scoped Classical TensorProduct |
| 56 | |
| 57 | def matrixScalarExtension {k K : Type} [Field k] [Field K] [Algebra k K] (n : ℕ) : |
| 58 | K ⊗[k] Matrix (Fin n) (Fin n) k ≃ₗ[K] Matrix (Fin n) (Fin n) K := |
| 59 | (TensorProduct.piRight k K K (fun _ : Fin n => Fin n → k)).trans |
| 60 | (LinearEquiv.piCongrRight fun _ => TensorProduct.piScalarRight k K K (Fin n)) |
| 61 | |
| 62 | theorem matrixScalarExtension_tmul |
| 63 | {k K : Type} [Field k] [Field K] [Algebra k K] {n : ℕ} |
| 64 | (a : K) (A : Matrix (Fin n) (Fin n) k) : |
| 65 | matrixScalarExtension n (a ⊗ₜ[k] A) = a • A.map (algebraMap k K) := by |
| 66 | ext i j |
| 67 | change A i j • a = a * algebraMap k K (A i j) |
| 68 | rw [Algebra.smul_def, mul_comm] |
| 69 | |
| 70 | def matrixSubspaceExtension |
| 71 | {k K : Type} [Field k] [Field K] [Algebra k K] {n : ℕ} |
| 72 | (W : Submodule k (Matrix (Fin n) (Fin n) k)) : |
| 73 | Submodule K (Matrix (Fin n) (Fin n) K) := |
| 74 | (W.baseChange K).map (matrixScalarExtension n).toLinearMap |
| 75 | |
| 76 | theorem matrixSubspaceExtension_eq_span |
| 77 | {k K : Type} [Field k] [Field K] [Algebra k K] {n : ℕ} |
| 78 | (W : Submodule k (Matrix (Fin n) (Fin n) k)) : |
| 79 | matrixSubspaceExtension (K := K) W = |
| 80 | Submodule.span K ((fun A : Matrix (Fin n) (Fin n) k => A.map (algebraMap k K)) '' W) := by |
| 81 | unfold matrixSubspaceExtension |
| 82 | conv_lhs => rw [← Submodule.span_eq W] |
| 83 | rw [Submodule.baseChange_span, Submodule.map_span, Set.image_image] |
| 84 | congr 1 |
| 85 | congr 1 |
| 86 | funext A |
| 87 | exact (matrixScalarExtension_tmul (1 : K) A).trans (one_smul K _) |
| 88 | |
| 89 | end |
| 90 | |
| 91 | section |
| 92 | |
| 93 | /-! Matrix scalar extension over a commutative coefficient algebra, |
| 94 | including the Minkowski algebra, need not be a field extension. -/ |
| 95 | |
| 96 | open scoped Classical TensorProduct |
| 97 | |
| 98 | def matrixAlgebraExtension |
| 99 | {k R : Type} [Field k] [CommRing R] [Algebra k R] (n : ℕ) : |
| 100 | R ⊗[k] Matrix (Fin n) (Fin n) k ≃ₗ[R] Matrix (Fin n) (Fin n) R := |
| 101 | (TensorProduct.piRight k R R (fun _ : Fin n => Fin n → k)).trans |
| 102 | (LinearEquiv.piCongrRight fun _ => TensorProduct.piScalarRight k R R (Fin n)) |
| 103 | |
| 104 | theorem matrixAlgebraExtension_tmul |
| 105 | {k R : Type} [Field k] [CommRing R] [Algebra k R] {n : ℕ} |
| 106 | (a : R) (A : Matrix (Fin n) (Fin n) k) : |
| 107 | matrixAlgebraExtension n (a ⊗ₜ[k] A) = a • A.map (algebraMap k R) := by |
| 108 | ext i j : 1 |
| 109 | change A i j • a = a * algebraMap k R (A i j) |
| 110 | rw [Algebra.smul_def, mul_comm] |
| 111 | |
| 112 | def matrixSubmoduleAlgebraExtension |
| 113 | {k R : Type} [Field k] [CommRing R] [Algebra k R] {n : ℕ} |
| 114 | (W : Submodule k (Matrix (Fin n) (Fin n) k)) : |
| 115 | Submodule R (Matrix (Fin n) (Fin n) R) := |
| 116 | (W.baseChange R).map (matrixAlgebraExtension n).toLinearMap |
| 117 | |
| 118 | theorem matrixSubmoduleAlgebraExtension_eq_span |
| 119 | {k R : Type} [Field k] [CommRing R] [Algebra k R] {n : ℕ} |
| 120 | (W : Submodule k (Matrix (Fin n) (Fin n) k)) : |
| 121 | matrixSubmoduleAlgebraExtension (R := R) W = |
| 122 | Submodule.span R ((fun A : Matrix (Fin n) (Fin n) k => A.map (algebraMap k R)) '' W) := by |
| 123 | unfold matrixSubmoduleAlgebraExtension |
| 124 | conv_lhs => rw [← Submodule.span_eq W] |
| 125 | rw [Submodule.baseChange_span, Submodule.map_span, Set.image_image] |
| 126 | congr 1 |
| 127 | congr 1 |
| 128 | funext A |
| 129 | exact (matrixAlgebraExtension_tmul (1 : R) A).trans (one_smul R _) |
| 130 | |
| 131 | theorem algebraExtension_kernel |
| 132 | {k R V W : Type*} [Field k] [CommRing R] [Algebra k R] |
| 133 | [AddCommGroup V] [Module k V] [AddCommGroup W] [Module k W] |
| 134 | (f : V →ₗ[k] W) : (f.ker).baseChange R = (f.baseChange R).ker := by |
| 135 | exact (Module.Flat.ker_lTensor_eq (S := R) R f).symm |
| 136 | |
| 137 | end |
| 138 | |
| 139 | /-! Finite matrix linear systems extend to a coefficient algebra and |
| 140 | their kernels are exactly the extended rational solution spaces. -/ |
| 141 | |
| 142 | open scoped Classical TensorProduct |
| 143 | |
| 144 | def matrixLinearSystemExtension |
| 145 | {k R ι : Type} [Field k] [CommRing R] [Algebra k R] [Fintype ι] {n : ℕ} |
| 146 | (f : Matrix (Fin n) (Fin n) k →ₗ[k] (ι → k)) : |
| 147 | Matrix (Fin n) (Fin n) R →ₗ[R] (ι → R) := |
| 148 | (TensorProduct.piScalarRight k R R ι).toLinearMap.comp |
| 149 | ((f.baseChange R).comp (matrixAlgebraExtension n).symm.toLinearMap) |
| 150 | |
| 151 | theorem matrixLinearSystemExtension_tmul |
| 152 | {k R ι : Type} [Field k] [CommRing R] [Algebra k R] [Fintype ι] {n : ℕ} |
| 153 | (f : Matrix (Fin n) (Fin n) k →ₗ[k] (ι → k)) (a : R) |
| 154 | (A : Matrix (Fin n) (Fin n) k) : |
| 155 | matrixLinearSystemExtension f (matrixAlgebraExtension n (a ⊗ₜ[k] A)) = |
| 156 | fun i => a * algebraMap k R (f A i) := by |
| 157 | change TensorProduct.piScalarRight k R R ι |
| 158 | (f.baseChange R ((matrixAlgebraExtension n).symm (matrixAlgebraExtension n (a ⊗ₜ[k] A)))) = _ |
| 159 | rw [LinearEquiv.symm_apply_apply, LinearMap.baseChange_tmul, |
| 160 | TensorProduct.piScalarRight_apply, TensorProduct.piScalarRightHom_tmul] |
| 161 | funext i |
| 162 | change f A i • a = a * algebraMap k R (f A i) |
| 163 | rw [Algebra.smul_def, mul_comm] |
| 164 | |
| 165 | theorem matrixLinearSystemExtension_base_matrix |
| 166 | {k R ι : Type} [Field k] [CommRing R] [Algebra k R] [Fintype ι] {n : ℕ} |
| 167 | (f : Matrix (Fin n) (Fin n) k →ₗ[k] (ι → k)) (A : Matrix (Fin n) (Fin n) k) : |
| 168 | matrixLinearSystemExtension (R := R) f (A.map (algebraMap k R)) = |
| 169 | fun i => algebraMap k R (f A i) := by |
| 170 | have h := matrixLinearSystemExtension_tmul f (1 : R) A |
| 171 | simpa only [matrixAlgebraExtension_tmul, one_smul, one_mul] using h |
| 172 | |
| 173 | theorem matrixLinearSystemExtension_kernel |
| 174 | {k R ι : Type} [Field k] [CommRing R] [Algebra k R] [Fintype ι] {n : ℕ} |
| 175 | (f : Matrix (Fin n) (Fin n) k →ₗ[k] (ι → k)) : |
| 176 | matrixSubmoduleAlgebraExtension (R := R) f.ker = (matrixLinearSystemExtension (R := R) f).ker := by |
| 177 | ext A |
| 178 | constructor |
| 179 | · rintro ⟨x, hx, rfl⟩ |
| 180 | rw [algebraExtension_kernel] at hx |
| 181 | change TensorProduct.piScalarRight k R R ι |
| 182 | (f.baseChange R ((matrixAlgebraExtension n).symm (matrixAlgebraExtension n x))) = 0 |
| 183 | rw [LinearEquiv.symm_apply_apply, hx, map_zero] |
| 184 | · intro hA |
| 185 | refine ⟨(matrixAlgebraExtension n).symm A, ?_, (matrixAlgebraExtension n).apply_symm_apply A⟩ |
| 186 | rw [algebraExtension_kernel] |
| 187 | apply (TensorProduct.piScalarRight k R R ι).injective |
| 188 | rw [map_zero] |
| 189 | exact hA |
| 190 | |
| 191 | theorem matrixLinearSystemExtension_coefficient_map |
| 192 | {k R S ι : Type} [Field k] [CommRing R] [CommRing S] [Algebra k R] [Algebra k S] |
| 193 | [Fintype ι] {n : ℕ} (f : Matrix (Fin n) (Fin n) k →ₗ[k] (ι → k)) |
| 194 | (ψ : R →ₐ[k] S) (A : Matrix (Fin n) (Fin n) R) : |
| 195 | matrixLinearSystemExtension f (A.map ψ) = fun i => ψ (matrixLinearSystemExtension f A i) := by |
| 196 | obtain ⟨x, rfl⟩ := (matrixAlgebraExtension (k := k) (R := R) n).surjective A |
| 197 | induction x using TensorProduct.inductionOn with |
| 198 | | add x y hx hy => |
| 199 | rw [map_add, Matrix.map_add ψ ψ.map_add, map_add, hx, hy] |
| 200 | funext i |
| 201 | simp only [Pi.add_apply, map_add] |
| 202 | | tmul a B => |
| 203 | have hm : (matrixAlgebraExtension n (a ⊗ₜ[k] B)).map ψ = |
| 204 | matrixAlgebraExtension n (ψ a ⊗ₜ[k] B) := by |
| 205 | ext i j : 1 |
| 206 | simp only [matrixAlgebraExtension_tmul, Matrix.map_apply, Matrix.smul_apply, smul_eq_mul, |
| 207 | map_mul, ψ.commutes] |
| 208 | rw [hm, matrixLinearSystemExtension_tmul, matrixLinearSystemExtension_tmul] |
| 209 | funext i |
| 210 | rw [map_mul, ψ.commutes] |
| 211 | |
| 212 | end |
| 213 | |
| 214 | end OAI.NumberTheory.ArithmeticGroups.Lattices.MatrixFlatExtension.Construction |