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 | /- |
| 2 | Copyright 2026 The Formal Conjectures Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | This file has been modified. |
| 16 | -/ |
| 17 | import Mathlib.Analysis.Calculus.FDeriv.Analytic |
| 18 | import Mathlib.Analysis.Complex.Basic |
| 19 | import Mathlib.Analysis.Normed.Module.Alternating.Uncurry.Fin |
| 20 | import Mathlib.LinearAlgebra.Matrix.Determinant.Basic |
| 21 | import Mathlib.Analysis.Calculus.FDeriv.Pi |
| 22 | |
| 23 | /-! # Normed Space Wedge Covectors -/ |
| 24 | |
| 25 | namespace OAI.Analysis.Foundations.NormedSpaceWedgeCovectors.ContinuousAlternatingMap |
| 26 | |
| 27 | noncomputable section |
| 28 | |
| 29 | open _root_.ContinuousAlternatingMap |
| 30 | |
| 31 | /-! |
| 32 | # Wedge products of continuous covectors |
| 33 | |
| 34 | The wedge of continuous linear functionals on a normed space is the alternating form whose value |
| 35 | on a family of vectors is the determinant of the matrix of pairings. This file builds it by |
| 36 | alternatizing the covector product, proves the determinant formula, and derives the multilinearity |
| 37 | and alternation properties in each covector slot. |
| 38 | |
| 39 | On `ι' → 𝕜` the coordinate projections wedge to the standard volume form, and every continuous |
| 40 | alternating form is a finite combination of wedges of coordinate projections. The coefficients |
| 41 | in that expansion are continuous linear functionals of the form, so a form depending analytically |
| 42 | on a parameter has analytic coefficients. |
| 43 | -/ |
| 44 | |
| 45 | variable {𝕜 E : Type*} [NontriviallyNormedField 𝕜] [NormedAddCommGroup E] [NormedSpace 𝕜 E] |
| 46 | variable {ι : Type*} [Fintype ι] [DecidableEq ι] |
| 47 | |
| 48 | variable (𝕜 E) in |
| 49 | /-- The wedge of continuous linear functionals, built by alternatization. -/ |
| 50 | def wedgeCovectors (L : ι → E →L[𝕜] 𝕜) : E [⋀^ι]→L[𝕜] 𝕜 := |
| 51 | ContinuousMultilinearMap.alternatization |
| 52 | ((ContinuousMultilinearMap.mkPiAlgebra 𝕜 ι 𝕜).compContinuousLinearMap L) |
| 53 | |
| 54 | /-- Evaluation of a wedge of covectors is the determinant of their pairing matrix. -/ |
| 55 | lemma wedgeCovectors_apply_eq_det (L : ι → E →L[𝕜] 𝕜) (v : ι → E) : |
| 56 | wedgeCovectors 𝕜 E L v = Matrix.det |
| 57 | (Matrix.of (fun i j ↦ L i (v j))) := by |
| 58 | rw [wedgeCovectors, ContinuousMultilinearMap.alternatization_apply_apply, |
| 59 | ← Matrix.det_transpose, Matrix.det_apply] |
| 60 | refine Finset.sum_congr rfl fun σ _ ↦ ?_ |
| 61 | simp |
| 62 | |
| 63 | /-- For an empty index type, the wedge of covectors is the constant form `1`. -/ |
| 64 | @[simp] |
| 65 | lemma wedgeCovectors_of_isEmpty [IsEmpty ι] (L : ι → E →L[𝕜] 𝕜) : |
| 66 | wedgeCovectors 𝕜 E L = ContinuousAlternatingMap.constOfIsEmpty 𝕜 E ι 1 := |
| 67 | ContinuousAlternatingMap.ext fun _ ↦ by simp [wedgeCovectors_apply_eq_det] |
| 68 | |
| 69 | /-- In degree zero, the wedge of covectors is the constant form `1`. -/ |
| 70 | lemma wedgeCovectors_zero (L : Fin 0 → E →L[𝕜] 𝕜) : |
| 71 | wedgeCovectors 𝕜 E L = ContinuousAlternatingMap.constOfIsEmpty 𝕜 E (Fin 0) 1 := |
| 72 | wedgeCovectors_of_isEmpty L |
| 73 | |
| 74 | /-- Expanding a wedge along the first covector gives an alternatizing uncurry. -/ |
| 75 | lemma wedgeCovectors_succ (p : ℕ) (L : Fin (p + 1) → E →L[𝕜] 𝕜) : |
| 76 | wedgeCovectors 𝕜 E L = |
| 77 | ContinuousAlternatingMap.alternatizeUncurryFin |
| 78 | (ContinuousLinearMap.smulRight (L 0) (wedgeCovectors 𝕜 E (fun i ↦ L i.succ))) := by |
| 79 | refine ContinuousAlternatingMap.ext fun v ↦ ?_ |
| 80 | rw [wedgeCovectors_apply_eq_det, ContinuousAlternatingMap.alternatizeUncurryFin_apply, |
| 81 | Matrix.det_succ_row_zero] |
| 82 | refine Finset.sum_congr rfl fun j _ ↦ ?_ |
| 83 | simp only [ContinuousLinearMap.smulRight_apply, Matrix.of_apply, |
| 84 | zsmul_eq_mul, Int.cast_pow, Int.cast_neg, Int.cast_one, |
| 85 | ContinuousAlternatingMap.smul_apply, smul_eq_mul] |
| 86 | rw [wedgeCovectors_apply_eq_det, mul_assoc] |
| 87 | congr 2 |
| 88 | |
| 89 | /-- The wedge construction is additive in each covector. -/ |
| 90 | lemma wedgeCovectors_update_add |
| 91 | (L : ι → E →L[𝕜] 𝕜) (i : ι) (a b : E →L[𝕜] 𝕜) : |
| 92 | wedgeCovectors 𝕜 E (Function.update L i (a + b)) = |
| 93 | wedgeCovectors 𝕜 E (Function.update L i a) + |
| 94 | wedgeCovectors 𝕜 E (Function.update L i b) := by |
| 95 | refine ContinuousAlternatingMap.ext fun v ↦ ?_ |
| 96 | simp only [ContinuousAlternatingMap.add_apply, wedgeCovectors_apply_eq_det] |
| 97 | have h (x : E →L[𝕜] 𝕜) : Matrix.of (fun k j ↦ (Function.update L i x) k (v j)) = |
| 98 | (Matrix.of (fun k j ↦ L k (v j))).updateRow i (fun j ↦ x (v j)) := by |
| 99 | ext k j; obtain rfl | h := eq_or_ne k i <;> simp [*] |
| 100 | rw [h (a + b), h a, h b] |
| 101 | exact Matrix.det_updateRow_add _ i _ _ |
| 102 | |
| 103 | /-- The wedge construction is homogeneous in each covector. -/ |
| 104 | lemma wedgeCovectors_update_smul |
| 105 | (L : ι → E →L[𝕜] 𝕜) (i : ι) (c : 𝕜) (a : E →L[𝕜] 𝕜) : |
| 106 | wedgeCovectors 𝕜 E (Function.update L i (c • a)) = |
| 107 | c • wedgeCovectors 𝕜 E (Function.update L i a) := by |
| 108 | refine ContinuousAlternatingMap.ext fun v ↦ ?_ |
| 109 | simp only [ContinuousAlternatingMap.smul_apply, wedgeCovectors_apply_eq_det] |
| 110 | have h (x : E →L[𝕜] 𝕜) : Matrix.of (fun k j ↦ (Function.update L i x) k (v j)) = |
| 111 | (Matrix.of (fun k j ↦ L k (v j))).updateRow i (fun j ↦ x (v j)) := by |
| 112 | ext k j; obtain rfl | h := eq_or_ne k i <;> simp [*] |
| 113 | rw [h (c • a), h a] |
| 114 | simp only [_root_.smul_apply] |
| 115 | exact Matrix.det_updateRow_smul _ i c _ |
| 116 | |
| 117 | /-- A wedge with two equal covectors vanishes. -/ |
| 118 | lemma wedgeCovectors_eq_zero_of_eq |
| 119 | (L : ι → E →L[𝕜] 𝕜) (i j : ι) |
| 120 | (h : L i = L j) (hne : i ≠ j) : |
| 121 | wedgeCovectors 𝕜 E L = 0 := |
| 122 | ContinuousAlternatingMap.ext fun _ ↦ by |
| 123 | rw [wedgeCovectors_apply_eq_det] |
| 124 | exact Matrix.det_zero_of_row_eq hne (by ext; simp [h]) |
| 125 | |
| 126 | /-- A wedge containing the zero covector vanishes. -/ |
| 127 | lemma wedgeCovectors_update_zero |
| 128 | (L : ι → E →L[𝕜] 𝕜) (i : ι) : |
| 129 | wedgeCovectors 𝕜 E (Function.update L i 0) = 0 := |
| 130 | ContinuousAlternatingMap.ext fun _ ↦ by |
| 131 | rw [wedgeCovectors_apply_eq_det] |
| 132 | exact Matrix.det_eq_zero_of_row_eq_zero i fun _ ↦ by simp |
| 133 | |
| 134 | /-- The standard constant volume form on `ι → 𝕜`. -/ |
| 135 | def standardVolumeForm (ι : Type*) [Fintype ι] [DecidableEq ι] : |
| 136 | (ι → 𝕜) [⋀^ι]→L[𝕜] 𝕜 := |
| 137 | wedgeCovectors 𝕜 (ι → 𝕜) ContinuousLinearMap.proj |
| 138 | |
| 139 | /-- Wedges of covectors commute with pullback along a continuous linear map. -/ |
| 140 | lemma wedgeCovectors_compContinuousLinearMap |
| 141 | {E F : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] |
| 142 | [NormedAddCommGroup F] [NormedSpace 𝕜 F] |
| 143 | (L : ι → F →L[𝕜] 𝕜) (T : E →L[𝕜] F) : |
| 144 | wedgeCovectors 𝕜 E (fun i ↦ (L i).comp T) = |
| 145 | (wedgeCovectors 𝕜 F L).compContinuousLinearMap T := |
| 146 | ContinuousAlternatingMap.ext fun _ ↦ by simp [wedgeCovectors_apply_eq_det] |
| 147 | |
| 148 | omit [Fintype ι] [DecidableEq ι] in |
| 149 | lemma add_compContinuousLinearMap |
| 150 | {E F : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] |
| 151 | [NormedAddCommGroup F] [NormedSpace 𝕜 F] |
| 152 | (a b : F [⋀^ι]→L[𝕜] 𝕜) (T : E →L[𝕜] F) : |
| 153 | (a + b).compContinuousLinearMap T = |
| 154 | a.compContinuousLinearMap T + b.compContinuousLinearMap T := |
| 155 | map_add (ContinuousAlternatingMap.compContinuousLinearMapₗ T) a b |
| 156 | |
| 157 | omit [Fintype ι] [DecidableEq ι] in |
| 158 | lemma smul_compContinuousLinearMap |
| 159 | {E F : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] |
| 160 | [NormedAddCommGroup F] [NormedSpace 𝕜 F] |
| 161 | (c : 𝕜) (a : F [⋀^ι]→L[𝕜] 𝕜) (T : E →L[𝕜] F) : |
| 162 | (c • a).compContinuousLinearMap T = c • a.compContinuousLinearMap T := |
| 163 | map_smul (ContinuousAlternatingMap.compContinuousLinearMapₗ T) c a |
| 164 | |
| 165 | variable {ι' : Type*} [Fintype ι'] [DecidableEq ι'] |
| 166 | |
| 167 | /-- The product of a tuple of coordinate covectors. -/ |
| 168 | def covectorProduct (I : ι → ι') : |
| 169 | ContinuousMultilinearMap 𝕜 (fun _ : ι ↦ ι' → 𝕜) 𝕜 := |
| 170 | (ContinuousMultilinearMap.mkPiAlgebra 𝕜 ι 𝕜).compContinuousLinearMap |
| 171 | (fun j ↦ ContinuousLinearMap.proj (I j)) |
| 172 | |
| 173 | omit [DecidableEq ι] [Fintype ι'] [DecidableEq ι'] in |
| 174 | @[simp] lemma covectorProduct_apply (I : ι → ι') |
| 175 | (v : ι → ι' → 𝕜) : |
| 176 | covectorProduct I v = ∏ j, v j (I j) := by |
| 177 | simp [covectorProduct, ContinuousMultilinearMap.compContinuousLinearMap_apply, |
| 178 | ContinuousMultilinearMap.mkPiAlgebra_apply] |
| 179 | |
| 180 | /-- A multilinear form on a finite product is the sum of its coordinate monomials. -/ |
| 181 | lemma multilinear_eq_sum_covectorProduct |
| 182 | (A : ContinuousMultilinearMap 𝕜 (fun _ : ι ↦ ι' → 𝕜) 𝕜) : |
| 183 | A = ∑ I : ι → ι', |
| 184 | A (fun j ↦ Pi.single (I j) 1) • covectorProduct I := by |
| 185 | classical |
| 186 | apply ContinuousMultilinearMap.toMultilinearMap_injective |
| 187 | change A.toMultilinearMap = |
| 188 | ContinuousMultilinearMap.toMultilinearMapLinear |
| 189 | (R' := 𝕜) (∑ I : ι → ι', |
| 190 | A (fun j ↦ Pi.single (I j) 1) • covectorProduct I) |
| 191 | rw [_root_.map_sum] |
| 192 | simp_rw [_root_.map_smul] |
| 193 | refine Module.Basis.ext_multilinear (fun _ : ι ↦ Pi.basisFun 𝕜 ι') fun v ↦ ?_ |
| 194 | simp only [_root_.sum_apply, _root_.smul_apply, smul_eq_mul] |
| 195 | rw [Finset.sum_eq_single v] |
| 196 | · simp [Pi.basisFun_apply] |
| 197 | · intro I hI hne |
| 198 | change A (fun j ↦ Pi.single (I j) 1) * |
| 199 | covectorProduct I (fun j ↦ Pi.basisFun 𝕜 ι' (v j)) = 0 |
| 200 | rw [covectorProduct_apply] |
| 201 | obtain ⟨j, hj⟩ := Function.ne_iff.mp hne |
| 202 | have hz : (Pi.basisFun 𝕜 ι' (v j)) (I j) = 0 := by |
| 203 | simp [Pi.basisFun_apply, hj.symm] |
| 204 | rw [Finset.prod_eq_zero (Finset.mem_univ j) hz, mul_zero] |
| 205 | · simp |
| 206 | |
| 207 | omit [DecidableEq ι'] in |
| 208 | /-- Alternatizing a coordinate monomial gives the wedge of its coordinate covectors. -/ |
| 209 | lemma alternatization_covectorProduct (I : ι → ι') : |
| 210 | ContinuousMultilinearMap.alternatization (covectorProduct I) = |
| 211 | wedgeCovectors 𝕜 (ι' → 𝕜) (fun j ↦ ContinuousLinearMap.proj (I j)) := |
| 212 | rfl |
| 213 | |
| 214 | lemma alternatization_smul (c : 𝕜) |
| 215 | (M : ContinuousMultilinearMap 𝕜 (fun _ : ι ↦ E) 𝕜) : |
| 216 | ContinuousMultilinearMap.alternatization (c • M) = |
| 217 | c • ContinuousMultilinearMap.alternatization M := by |
| 218 | ext v |
| 219 | simp only [ContinuousMultilinearMap.alternatization_apply_apply, _root_.smul_apply, |
| 220 | ContinuousAlternatingMap.smul_apply, Finset.smul_sum, smul_comm c] |
| 221 | |
| 222 | lemma alternatization_toContinuousMultilinearMap |
| 223 | (A : E [⋀^ι]→L[𝕜] 𝕜) : |
| 224 | ContinuousMultilinearMap.alternatization A.toContinuousMultilinearMap = |
| 225 | ((Fintype.card ι).factorial : 𝕜) • A := by |
| 226 | apply ContinuousAlternatingMap.toAlternatingMap_injective |
| 227 | rw [ContinuousMultilinearMap.alternatization_apply_toAlternatingMap] |
| 228 | change MultilinearMap.alternatization A.toAlternatingMap.toMultilinearMap = |
| 229 | ((Fintype.card ι).factorial : 𝕜) • A.toAlternatingMap |
| 230 | simpa only [Nat.cast_smul_eq_nsmul] using |
| 231 | AlternatingMap.coe_alternatization A.toAlternatingMap |
| 232 | |
| 233 | /-- A continuous alternating form on `ι' → 𝕜` is the finite coordinate-wedge expansion |
| 234 | of its values on the standard coordinate vectors. -/ |
| 235 | lemma alternating_eq_sum_wedgeCovectors [CharZero 𝕜] |
| 236 | (A : (ι' → 𝕜) [⋀^ι]→L[𝕜] 𝕜) : |
| 237 | A = ∑ I : ι → ι', |
| 238 | (((Fintype.card ι).factorial : 𝕜)⁻¹ * A (fun j ↦ Pi.single (I j) 1)) • |
| 239 | wedgeCovectors 𝕜 (ι' → 𝕜) |
| 240 | (fun j ↦ ContinuousLinearMap.proj (I j)) := by |
| 241 | classical |
| 242 | have hM := multilinear_eq_sum_covectorProduct A.toContinuousMultilinearMap |
| 243 | have hAlt := congrArg ContinuousMultilinearMap.alternatization hM |
| 244 | rw [alternatization_toContinuousMultilinearMap A] at hAlt |
| 245 | simp only [_root_.map_sum] at hAlt |
| 246 | simp_rw [alternatization_smul, alternatization_covectorProduct] at hAlt |
| 247 | change ((Fintype.card ι).factorial : 𝕜) • A = |
| 248 | ∑ I : ι → ι', A (fun j ↦ Pi.single (I j) 1) • |
| 249 | wedgeCovectors 𝕜 (ι' → 𝕜) |
| 250 | (fun j ↦ ContinuousLinearMap.proj (I j)) at hAlt |
| 251 | have hfac : ((Fintype.card ι).factorial : 𝕜) ≠ 0 := by exact_mod_cast Nat.factorial_ne_zero _ |
| 252 | nth_rw 1 [← inv_smul_smul₀ hfac A] |
| 253 | rw [hAlt, Finset.smul_sum] |
| 254 | simp_rw [smul_smul] |
| 255 | |
| 256 | /-- Evaluation at a fixed tuple is a continuous linear functional on continuous alternating |
| 257 | forms. -/ |
| 258 | def alternatingFormEvaluation (v : ι → E) : |
| 259 | (E [⋀^ι]→L[𝕜] 𝕜) →L[𝕜] 𝕜 := |
| 260 | ContinuousAlternatingMap.apply 𝕜 E 𝕜 v |
| 261 | |
| 262 | /-- The coefficient of an alternating form field in its finite coordinate-wedge expansion. -/ |
| 263 | def coordinateCoefficient |
| 264 | (θ : (ι' → 𝕜) → (ι' → 𝕜) [⋀^ι]→L[𝕜] 𝕜) |
| 265 | (I : ι → ι') (y : ι' → 𝕜) : 𝕜 := |
| 266 | ((Fintype.card ι).factorial : 𝕜)⁻¹ * θ y (fun j ↦ Pi.single (I j) 1) |
| 267 | |
| 268 | omit [DecidableEq ι] in |
| 269 | lemma analyticOnNhd_coordinateCoefficient |
| 270 | (θ : (ι' → 𝕜) → (ι' → 𝕜) [⋀^ι]→L[𝕜] 𝕜) |
| 271 | {s : Set (ι' → 𝕜)} (hθ : AnalyticOnNhd 𝕜 θ s) (I : ι → ι') : |
| 272 | AnalyticOnNhd 𝕜 (coordinateCoefficient θ I) s := by |
| 273 | let e : ι → ι' → 𝕜 := fun j ↦ Pi.single (I j) 1 |
| 274 | exact ((alternatingFormEvaluation e).comp_analyticOnNhd hθ).const_smul |
| 275 | (c := ((Fintype.card ι).factorial : 𝕜)⁻¹) |
| 276 | |
| 277 | end |
| 278 | |
| 279 | end OAI.Analysis.Foundations.NormedSpaceWedgeCovectors.ContinuousAlternatingMap |