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 OAI.AlgebraicTopology.Singular.RelativeHomotopyInvariance |
| 18 | import OAI.AlgebraicTopology.LocalHomology.ComplexClass |
| 19 | import Mathlib.Analysis.Complex.Exponential |
| 20 | import Mathlib.Analysis.SpecialFunctions.Complex.Log |
| 21 | import Mathlib.Analysis.Normed.Module.FiniteDimension |
| 22 | import Mathlib.LinearAlgebra.Matrix.Transvection |
| 23 | |
| 24 | /-! # Complex Class Linear Invariance -/ |
| 25 | |
| 26 | namespace OAI.AlgebraicTopology.LocalHomology.ComplexClassLinearInvariance |
| 27 | |
| 28 | noncomputable section |
| 29 | |
| 30 | open _root_.Matrix |
| 31 | |
| 32 | /-! |
| 33 | # Invariance of the complex local class under complex-linear coordinate changes |
| 34 | |
| 35 | An invertible complex matrix is joined to the identity through invertible complex matrices. |
| 36 | The proof uses Mathlib's generation of invertible matrices by diagonal matrices and |
| 37 | transvections. Diagonal entries are joined to one by `exp (t * log z)`, while a transvection is |
| 38 | joined to one by scaling its off-diagonal entry by `t`. |
| 39 | |
| 40 | The resulting isotopy gives a homotopy of punctured pairs. Hence every complex-linear |
| 41 | automorphism acts trivially on the explicitly normalized standard complex local homology class. |
| 42 | This supplies the linear local-degree step needed to compare holomorphic coordinate charts; the |
| 43 | remaining nonlinear step is to replace a chart transition germ by its derivative. |
| 44 | -/ |
| 45 | |
| 46 | open _root_.CategoryTheory _root_.Topology |
| 47 | |
| 48 | namespace Matrix |
| 49 | |
| 50 | variable {n : Type*} [Fintype n] [DecidableEq n] |
| 51 | |
| 52 | /-- An isotopy from the identity matrix to `A`, all of whose members are invertible. -/ |
| 53 | structure ComplexIsotopyToOne (A : Matrix n n ℂ) where |
| 54 | /-- The continuously varying matrix. -/ |
| 55 | path : C(unitInterval, Matrix n n ℂ) |
| 56 | /-- The path begins at the identity. -/ |
| 57 | map_zero : path 0 = 1 |
| 58 | /-- The path ends at the specified matrix. -/ |
| 59 | map_one : path 1 = A |
| 60 | /-- Every matrix along the path is invertible. -/ |
| 61 | det_ne_zero : ∀ t, (path t).det ≠ 0 |
| 62 | |
| 63 | namespace ComplexIsotopyToOne |
| 64 | |
| 65 | /-- Pointwise multiplication concatenates isotopies algebraically. This is the construction |
| 66 | used for products in the diagonal--transvection induction. -/ |
| 67 | def mul {A B : Matrix n n ℂ} |
| 68 | (hA : ComplexIsotopyToOne A) (hB : ComplexIsotopyToOne B) : |
| 69 | ComplexIsotopyToOne (A * B) where |
| 70 | path := |
| 71 | ⟨fun t ↦ hA.path t * hB.path t, by |
| 72 | refine continuous_pi fun i ↦ continuous_pi fun j ↦ ?_ |
| 73 | simp only [Matrix.mul_apply] |
| 74 | fun_prop⟩ |
| 75 | map_zero := by |
| 76 | change hA.path 0 * hB.path 0 = 1 |
| 77 | rw [hA.map_zero, hB.map_zero, Matrix.one_mul] |
| 78 | map_one := by |
| 79 | change hA.path 1 * hB.path 1 = A * B |
| 80 | rw [hA.map_one, hB.map_one] |
| 81 | det_ne_zero t := by |
| 82 | change (hA.path t * hB.path t).det ≠ 0 |
| 83 | rw [Matrix.det_mul] |
| 84 | exact mul_ne_zero (hA.det_ne_zero t) (hB.det_ne_zero t) |
| 85 | |
| 86 | /-- An invertible diagonal complex matrix is isotopic to the identity. -/ |
| 87 | def diagonal (D : n → ℂ) (hD : (Matrix.diagonal D).det ≠ 0) : |
| 88 | ComplexIsotopyToOne (Matrix.diagonal D) := |
| 89 | have hDi : ∀ i, D i ≠ 0 := fun i hi ↦ hD <| by |
| 90 | rw [Matrix.det_diagonal] |
| 91 | exact Finset.prod_eq_zero (Finset.mem_univ i) hi |
| 92 | { path := |
| 93 | ⟨fun t ↦ Matrix.diagonal fun i ↦ |
| 94 | Complex.exp (((t : ℝ) : ℂ) * Complex.log (D i)), by |
| 95 | refine continuous_pi fun i ↦ continuous_pi fun j ↦ ?_ |
| 96 | change Continuous (fun a : unitInterval ↦ if i = j then |
| 97 | Complex.exp (((a : ℝ) : ℂ) * Complex.log (D i)) else 0) |
| 98 | by_cases hij : i = j |
| 99 | · simp only [hij, ↓reduceIte] |
| 100 | fun_prop |
| 101 | · simp only [hij, ↓reduceIte] |
| 102 | exact continuous_const⟩ |
| 103 | map_zero := by |
| 104 | ext i j |
| 105 | by_cases hij : i = j |
| 106 | · subst j |
| 107 | simp [Matrix.diagonal] |
| 108 | · simp [Matrix.diagonal, hij] |
| 109 | map_one := by |
| 110 | ext i j |
| 111 | by_cases hij : i = j |
| 112 | · subst j |
| 113 | simp [Matrix.diagonal, Complex.exp_log (hDi i)] |
| 114 | · simp [Matrix.diagonal, hij] |
| 115 | det_ne_zero := by |
| 116 | intro t |
| 117 | change (Matrix.diagonal (fun i ↦ |
| 118 | Complex.exp (((t : ℝ) : ℂ) * Complex.log (D i)))).det ≠ 0 |
| 119 | rw [Matrix.det_diagonal] |
| 120 | exact Finset.prod_ne_zero_iff.mpr fun i _ ↦ Complex.exp_ne_zero _ } |
| 121 | |
| 122 | /-- A complex transvection is isotopic to the identity by scaling its off-diagonal entry. -/ |
| 123 | def transvection (t : Matrix.TransvectionStruct n ℂ) : |
| 124 | ComplexIsotopyToOne t.toMatrix := |
| 125 | let P : C(unitInterval, Matrix n n ℂ) := |
| 126 | ⟨fun s ↦ Matrix.transvection t.i t.j (((s : ℝ) : ℂ) * t.c), by |
| 127 | refine continuous_pi fun i ↦ continuous_pi fun j ↦ ?_ |
| 128 | change Continuous (fun a : unitInterval ↦ |
| 129 | (1 : Matrix n n ℂ) i j + |
| 130 | if t.i = i ∧ t.j = j then ((a : ℝ) : ℂ) * t.c else 0) |
| 131 | by_cases h : t.i = i ∧ t.j = j |
| 132 | · simp [h] |
| 133 | fun_prop |
| 134 | · simp [h] |
| 135 | exact continuous_const⟩ |
| 136 | { path := P |
| 137 | map_zero := by |
| 138 | change Matrix.transvection t.i t.j ((0 : ℂ) * t.c) = 1 |
| 139 | simp [Matrix.transvection] |
| 140 | map_one := by |
| 141 | change Matrix.transvection t.i t.j ((1 : ℂ) * t.c) = t.toMatrix |
| 142 | simp [Matrix.TransvectionStruct.toMatrix] |
| 143 | det_ne_zero := by |
| 144 | intro s |
| 145 | change (Matrix.transvection t.i t.j (((s : ℝ) : ℂ) * t.c)).det ≠ 0 |
| 146 | rw [Matrix.det_transvection_of_ne _ _ t.hij] |
| 147 | exact one_ne_zero } |
| 148 | |
| 149 | end ComplexIsotopyToOne |
| 150 | |
| 151 | /-- Every invertible complex matrix is isotopic to the identity through invertible matrices. |
| 152 | |
| 153 | This is a concrete form of path connectedness of `GLₙ(ℂ)`. -/ |
| 154 | theorem nonempty_complexIsotopyToOne (A : Matrix n n ℂ) (hA : A.det ≠ 0) : |
| 155 | Nonempty (ComplexIsotopyToOne A) := by |
| 156 | apply Matrix.diagonal_transvection_induction_of_det_ne_zero |
| 157 | (fun B ↦ Nonempty (ComplexIsotopyToOne B)) A hA |
| 158 | · intro D hD |
| 159 | exact ⟨ComplexIsotopyToOne.diagonal D hD⟩ |
| 160 | · intro t |
| 161 | exact ⟨ComplexIsotopyToOne.transvection t⟩ |
| 162 | · intro B C _hB _hC hB hC |
| 163 | exact ⟨hB.some.mul hC.some⟩ |
| 164 | |
| 165 | end Matrix |
| 166 | |
| 167 | namespace Singular |
| 168 | |
| 169 | variable (d : ℕ) |
| 170 | |
| 171 | /-- Joint continuity of matrix-vector multiplication along a continuous matrix path. -/ |
| 172 | lemma continuous_complexMatrixPath_mulVec |
| 173 | (H : C(unitInterval, Matrix (Fin d) (Fin d) ℂ)) : |
| 174 | Continuous (fun tx : unitInterval × (Fin d → ℂ) ↦ |
| 175 | (H tx.1).mulVec tx.2) := by fun_prop |
| 176 | |
| 177 | /-- Joint continuity on the punctured vector subspace. -/ |
| 178 | lemma continuous_complexMatrixPath_mulVec_punctured |
| 179 | (H : C(unitInterval, Matrix (Fin d) (Fin d) ℂ)) : |
| 180 | Continuous (fun tx : unitInterval × ({0}ᶜ : Set (Fin d → ℂ)) ↦ |
| 181 | (H tx.1).mulVec tx.2.1) := |
| 182 | (continuous_complexMatrixPath_mulVec d H).comp |
| 183 | (continuous_fst.prodMk (continuous_subtype_val.comp continuous_snd)) |
| 184 | |
| 185 | /-- The continuous self-map of complex affine space defined by a matrix. -/ |
| 186 | def complexMatrixMap (A : Matrix (Fin d) (Fin d) ℂ) : |
| 187 | TopCat.of (Fin d → ℂ) ⟶ TopCat.of (Fin d → ℂ) := |
| 188 | TopCat.ofHom ⟨A.mulVec, A.mulVecLin.continuous_of_finiteDimensional⟩ |
| 189 | |
| 190 | /-- An invertible complex matrix sends a nonzero vector to a nonzero vector. -/ |
| 191 | lemma complexMatrix_mulVec_ne_zero |
| 192 | (A : Matrix (Fin d) (Fin d) ℂ) (hA : A.det ≠ 0) |
| 193 | (z : ({0}ᶜ : Set (Fin d → ℂ))) : A.mulVec z.1 ≠ 0 := fun hz ↦ |
| 194 | z.2 (A.mulVec_injective_of_det_ne_zero hA (by simpa using hz)) |
| 195 | |
| 196 | /-- The restriction of an invertible complex matrix to the complement of the origin. -/ |
| 197 | def complexMatrixPuncturedMap (A : Matrix (Fin d) (Fin d) ℂ) (hA : A.det ≠ 0) : |
| 198 | TopCat.of ({0}ᶜ : Set (Fin d → ℂ)) ⟶ TopCat.of ({0}ᶜ : Set (Fin d → ℂ)) := |
| 199 | TopCat.ofHom |
| 200 | ⟨fun z ↦ ⟨A.mulVec z.1, complexMatrix_mulVec_ne_zero d A hA z⟩, |
| 201 | Continuous.subtype_mk |
| 202 | (A.mulVecLin.continuous_of_finiteDimensional.comp continuous_subtype_val) |
| 203 | (complexMatrix_mulVec_ne_zero d A hA)⟩ |
| 204 | |
| 205 | @[simp] |
| 206 | lemma complexMatrixMap_apply (A : Matrix (Fin d) (Fin d) ℂ) (z : Fin d → ℂ) : |
| 207 | complexMatrixMap d A z = A.mulVec z := rfl |
| 208 | |
| 209 | @[simp] |
| 210 | lemma complexMatrixPuncturedMap_apply |
| 211 | (A : Matrix (Fin d) (Fin d) ℂ) (hA : A.det ≠ 0) |
| 212 | (z : ({0}ᶜ : Set (Fin d → ℂ))) : |
| 213 | (complexMatrixPuncturedMap d A hA z).1 = A.mulVec z.1 := rfl |
| 214 | |
| 215 | /-- An invertible complex matrix acts on complex affine space and its punctured subspace. -/ |
| 216 | def complexMatrixPuncturedPairMap (A : Matrix (Fin d) (Fin d) ℂ) (hA : A.det ≠ 0) : |
| 217 | FundamentalClass.Singular.puncturedPair ℂ d ⟶ FundamentalClass.Singular.puncturedPair ℂ d := |
| 218 | TopPair.ofHom (X := FundamentalClass.Singular.puncturedPair ℂ d) |
| 219 | (Y := FundamentalClass.Singular.puncturedPair ℂ d) |
| 220 | (complexMatrixMap d A) |
| 221 | (complexMatrixPuncturedMap d A hA) |
| 222 | (by |
| 223 | apply TopCat.hom_ext |
| 224 | ext z |
| 225 | rfl) |
| 226 | |
| 227 | /-- An isotopy of invertible matrices induces a homotopy of their maps of punctured pairs. -/ |
| 228 | def complexMatrixPuncturedPairHomotopy |
| 229 | {A : Matrix (Fin d) (Fin d) ℂ} (hA : A.det ≠ 0) |
| 230 | (H : ComplexClassLinearInvariance.Matrix.ComplexIsotopyToOne A) : |
| 231 | TopPair.Homotopy (𝟙 (FundamentalClass.Singular.puncturedPair ℂ d)) |
| 232 | (complexMatrixPuncturedPairMap d A hA) where |
| 233 | fst := |
| 234 | { toFun := fun tx ↦ (H.path tx.1).mulVec tx.2 |
| 235 | continuous_toFun := continuous_complexMatrixPath_mulVec d H.path |
| 236 | map_zero_left := fun x ↦ by |
| 237 | simp only [H.map_zero] |
| 238 | exact Matrix.one_mulVec x |
| 239 | map_one_left := fun x ↦ by |
| 240 | simp only [H.map_one] |
| 241 | rfl } |
| 242 | snd := |
| 243 | { toFun := fun tx ↦ |
| 244 | ⟨(H.path tx.1).mulVec tx.2.1, by |
| 245 | intro hz |
| 246 | apply tx.2.2 |
| 247 | apply (H.path tx.1).mulVec_injective_of_det_ne_zero (H.det_ne_zero tx.1) |
| 248 | simpa using hz⟩ |
| 249 | continuous_toFun := by |
| 250 | apply Continuous.subtype_mk |
| 251 | exact continuous_complexMatrixPath_mulVec_punctured d H.path |
| 252 | map_zero_left := fun x ↦ by |
| 253 | apply Subtype.ext |
| 254 | simp only [H.map_zero] |
| 255 | exact Matrix.one_mulVec x.1 |
| 256 | map_one_left := fun x ↦ by |
| 257 | apply Subtype.ext |
| 258 | simp only [H.map_one] |
| 259 | rfl } |
| 260 | w := rfl |
| 261 | |
| 262 | /-- Every invertible complex matrix acts trivially on the standard complex local homology class. |
| 263 | -/ |
| 264 | theorem relativeHomologyMap_complexMatrix_standardComplexLocalClass |
| 265 | (A : Matrix (Fin d) (Fin d) ℂ) (hA : A.det ≠ 0) : |
| 266 | Singular.CohomologyTo.relativeHomologyMap ℚ (2 * d) (complexMatrixPuncturedPairMap d A hA) |
| 267 | (ComplexClass.Singular.standardComplexLocalClass ℚ d) = |
| 268 | ComplexClass.Singular.standardComplexLocalClass ℚ d := by |
| 269 | let H := (ComplexClassLinearInvariance.Matrix.nonempty_complexIsotopyToOne A hA).some |
| 270 | have h := Singular.RelativeHomotopyInvariance.TopPair.Homotopy.relativeHomologyMap_apply_eq |
| 271 | (R := ℚ) (complexMatrixPuncturedPairHomotopy d hA H) (2 * d) |
| 272 | (ComplexClass.Singular.standardComplexLocalClass ℚ d) |
| 273 | simpa using h.symm |
| 274 | |
| 275 | end Singular |
| 276 | |
| 277 | end |
| 278 | |
| 279 | end OAI.AlgebraicTopology.LocalHomology.ComplexClassLinearInvariance |