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 | |
| 16 | This file has been modified. |
| 17 | -/ |
| 18 | |
| 19 | import HodgeConjecture.Mathlib.Geometry.Convex.StdSimplexMetric |
| 20 | |
| 21 | import HodgeConjecture.Lemmas.AlgebraicTopology.Singular.Cohomology |
| 22 | |
| 23 | namespace OAI.AlgebraicTopology.LocalHomology.FundamentalClass |
| 24 | |
| 25 | /-! |
| 26 | # A standard local fundamental cycle |
| 27 | |
| 28 | This file constructs a canonical relative singular cycle in |
| 29 | `H_d(ℝ^d, ℝ^d ∖ {0}; R)`. The affine simplex has vertices the standard basis and |
| 30 | `(-1, ..., -1)`. Its barycenter is the unique point that maps to the origin, while each face |
| 31 | misses the origin. Its relative boundary therefore vanishes. |
| 32 | |
| 33 | This explicit cycle fixes the ordering and sign convention used to normalize local Thom and |
| 34 | fundamental classes. |
| 35 | -/ |
| 36 | |
| 37 | noncomputable section |
| 38 | |
| 39 | open _root_.CategoryTheory Limits |
| 40 | open scoped Simplicial |
| 41 | |
| 42 | section |
| 43 | namespace Singular |
| 44 | |
| 45 | variable (R : Type) [CommRing R] |
| 46 | |
| 47 | /-- Let `𝕜` be a field with a topology and `d` a natural number. This topological pair consists of |
| 48 | `𝕜^d`, with the product topology, and the inclusion of its subspace `𝕜^d \ {0}`. -/ |
| 49 | abbrev puncturedPair (𝕜 : Type) [Field 𝕜] [TopologicalSpace 𝕜] (d : ℕ) : TopPair := |
| 50 | TopPair.ofSubset (X := TopCat.of (Fin d → 𝕜)) ({0}ᶜ : Set (Fin d → 𝕜)) |
| 51 | |
| 52 | /-- Let `M` be a topological space and `W, S ⊆ M` subsets. This topological pair consists of the |
| 53 | subspace `W` and the inclusion into it of `W \ S`, also with its subspace topology. -/ |
| 54 | abbrev neighborhoodSupportComplementPair {M : Type} [TopologicalSpace M] (W S : Set M) : |
| 55 | TopPair := |
| 56 | -- The pair `(W, W \ S)`. |
| 57 | TopPair.ofSubset (X := TopCat.of W) {w | w.1 ∉ S} |
| 58 | |
| 59 | /-- For a natural number `d`, this affine map from the standard `d`-simplex to `ℝ^d` has ordered |
| 60 | vertices `e₀, …, e_{d-1}, (-1, …, -1)`. In barycentric coordinates it sends `t` to the vector |
| 61 | with coordinates `t_j - t_d`. -/ |
| 62 | def standardAffineSimplex (d : ℕ) (t : Convexity.StdSimplex ℝ (Fin (d + 1))) : Fin d → ℝ := |
| 63 | fun j => t.weights (Fin.castSucc j) - t.weights (Fin.last d) |
| 64 | |
| 65 | -- Mathlib proves this but does not tag it, so `fun_prop` cannot see through `Convexity.StdSimplex.map`. |
| 66 | attribute [fun_prop] Convexity.StdSimplex.continuous_map |
| 67 | |
| 68 | @[fun_prop] |
| 69 | lemma continuous_standardAffineSimplex (d : ℕ) : Continuous (standardAffineSimplex d) := |
| 70 | continuous_pi fun j => |
| 71 | (Convexity.StdSimplex.continuous_weights_apply ℝ (Fin.castSucc j)).sub |
| 72 | (Convexity.StdSimplex.continuous_weights_apply ℝ (Fin.last d)) |
| 73 | |
| 74 | lemma stdSimplex_map_succAbove_self_zero (n : ℕ) (i : Fin (n + 2)) |
| 75 | (t : Convexity.StdSimplex ℝ (Fin (n + 1))) : |
| 76 | (Convexity.StdSimplex.map i.succAbove t).weights i = 0 := by |
| 77 | exact Finsupp.mapDomain_of_notMem_range t.weights i (by simp) |
| 78 | |
| 79 | lemma standardAffineSimplex_ne_zero_of_coord_zero (d : ℕ) |
| 80 | (t : Convexity.StdSimplex ℝ (Fin (d + 1))) (i : Fin (d + 1)) (hi : t.weights i = 0) : |
| 81 | standardAffineSimplex d t ≠ 0 := by |
| 82 | intro h |
| 83 | have hcoord (j : Fin d) : t.weights (Fin.castSucc j) = t.weights (Fin.last d) := by |
| 84 | have hj := congr_fun h j |
| 85 | simpa [standardAffineSimplex] using sub_eq_zero.mp hj |
| 86 | have hlast : t.weights (Fin.last d) = 0 := by |
| 87 | rcases Fin.eq_castSucc_or_eq_last i with ⟨j, rfl⟩ | rfl |
| 88 | · exact (hcoord j).symm.trans hi |
| 89 | · exact hi |
| 90 | have hall (j : Fin (d + 1)) : t.weights j = 0 := by |
| 91 | rcases Fin.eq_castSucc_or_eq_last j with ⟨k, rfl⟩ | rfl |
| 92 | · exact (hcoord k).trans hlast |
| 93 | · exact hlast |
| 94 | have hzero : ∑ j, t.weights j = 0 := |
| 95 | Finset.sum_eq_zero fun j _ => hall j |
| 96 | exact zero_ne_one (hzero.symm.trans t.total_of_fintype) |
| 97 | |
| 98 | /-- For a natural number `d`, this is the singular `d`-simplex of `ℝ^d` given in barycentric |
| 99 | coordinates by `t ↦ (t_j - t_d)_j`. Its ordered vertices are the standard basis vectors followed |
| 100 | by `(-1, …, -1)`. -/ |
| 101 | def standardSingularSimplex (d : ℕ) : |
| 102 | (TopCat.toSSet.obj (puncturedPair ℝ d).fst) _⦋d⦌ := |
| 103 | ((puncturedPair ℝ d).fst.toSSetObjEquiv _).symm |
| 104 | ⟨standardAffineSimplex d, continuous_standardAffineSimplex d⟩ |
| 105 | |
| 106 | /-- For a natural number `n` and face index `i`, this continuous map from the standard `n`-simplex |
| 107 | to `ℝ^{n+1} \ {0}` is the `i`-th face of the affine simplex with vertices the standard basis |
| 108 | followed by `(-1, …, -1)`. The face avoids the origin because one barycentric coordinate is |
| 109 | zero. -/ |
| 110 | def standardFaceMap (n : ℕ) (i : Fin (n + 2)) : |
| 111 | C(Convexity.StdSimplex ℝ (Fin (n + 1)), ({0}ᶜ : Set (Fin (n + 1) → ℝ))) where |
| 112 | toFun t := ⟨standardAffineSimplex (n + 1) (Convexity.StdSimplex.map i.succAbove t), |
| 113 | standardAffineSimplex_ne_zero_of_coord_zero (n + 1) _ i |
| 114 | (stdSimplex_map_succAbove_self_zero n i t)⟩ |
| 115 | continuous_toFun := by fun_prop |
| 116 | |
| 117 | /-- For a natural number `n` and face index `i`, this is the singular `n`-simplex of `ℝ^{n+1} \ {0}` |
| 118 | obtained by omitting vertex `i` from the ordered affine simplex with vertices the standard basis |
| 119 | followed by `(-1, …, -1)`. -/ |
| 120 | def standardFaceSimplex (n : ℕ) (i : Fin (n + 2)) : |
| 121 | (TopCat.toSSet.obj (puncturedPair ℝ (n + 1)).snd) _⦋n⦌ := |
| 122 | ((puncturedPair ℝ (n + 1)).snd.toSSetObjEquiv _).symm |
| 123 | (standardFaceMap n i) |
| 124 | |
| 125 | /-- Let `R` be a commutative ring and `d` a natural number. This is the quotient singular chain |
| 126 | complex `C_*(ℝ^d; R)/C_*(ℝ^d \ {0}; R)` of the pair consisting of real coordinate space and its |
| 127 | punctured subspace. -/ |
| 128 | abbrev standardLocalRelativeChainComplex (d : ℕ) := |
| 129 | (_root_.OAI.AlgebraicTopology.Singular.Cohomology.relativeChainFunctor R).obj (puncturedPair ℝ d) |
| 130 | |
| 131 | /-- Let `R` be a commutative ring and `d` a natural number. This is the quotient map of chain |
| 132 | complexes `C_*(ℝ^d; R) → C_*(ℝ^d, ℝ^d \ {0}; R)`, which sets chains contained in the punctured |
| 133 | space equal to zero. -/ |
| 134 | def standardLocalProjection (d : ℕ) : |
| 135 | ((_root_.OAI.AlgebraicTopology.Singular.Cohomology.chainPairFunctor R).obj (puncturedPair ℝ d)).right ⟶ |
| 136 | standardLocalRelativeChainComplex R d := |
| 137 | _root_.OAI.AlgebraicTopology.Singular.Cohomology.relativeChainProjection R (puncturedPair ℝ d) |
| 138 | |
| 139 | /-- Let `R` be a commutative ring and `d` a natural number. The chosen affine simplex in `ℝ^d` has |
| 140 | ordered vertices `e₀, …, e_{d-1}, (-1, …, -1)`, where the `e_j` are standard basis vectors. This |
| 141 | linear map `R → C_d(ℝ^d; R)` sends `r` to `r` times that singular simplex. -/ |
| 142 | def standardAmbientSimplexChain (d : ℕ) : |
| 143 | ModuleCat.of R R ⟶ |
| 144 | ((_root_.OAI.AlgebraicTopology.Singular.Cohomology.chainPairFunctor R).obj (puncturedPair ℝ d)).right.X d := |
| 145 | (TopCat.toSSet.obj (puncturedPair ℝ d).fst).ιChainComplex |
| 146 | (standardSingularSimplex d) |
| 147 | |
| 148 | /-- Let `R` be a commutative ring and `d` a natural number. The chosen affine simplex in `ℝ^d` has |
| 149 | ordered vertices `e₀, …, e_{d-1}, (-1, …, -1)`, where the `e_j` are standard basis vectors. This |
| 150 | map `R → C_d(ℝ^d, ℝ^d \ {0}; R)` sends `1` to its relative chain class, by quotienting out |
| 151 | chains in the punctured space. -/ |
| 152 | def standardLocalChain (d : ℕ) : |
| 153 | ModuleCat.of R R ⟶ (standardLocalRelativeChainComplex R d).X d := |
| 154 | standardAmbientSimplexChain R d ≫ (standardLocalProjection R d).f d |
| 155 | |
| 156 | /-- Let `R` be a commutative ring, `n` a natural number, and `i` a face index. This linear map `R → |
| 157 | C_n(ℝ^{n+1}; R)` sends `1` to the `i`-th face of the affine simplex with ordered vertices the |
| 158 | standard basis followed by `(-1, …, -1)`. -/ |
| 159 | def standardAmbientFaceChain (n : ℕ) (i : Fin (n + 2)) : |
| 160 | ModuleCat.of R R ⟶ |
| 161 | ((_root_.OAI.AlgebraicTopology.Singular.Cohomology.chainPairFunctor R).obj (puncturedPair ℝ (n + 1))).right.X n := |
| 162 | (TopCat.toSSet.obj (puncturedPair ℝ (n + 1)).fst).ιChainComplex |
| 163 | ((TopCat.toSSet.obj (puncturedPair ℝ (n + 1)).fst).δ i |
| 164 | (standardSingularSimplex (n + 1))) |
| 165 | |
| 166 | /-- Let `R` be a commutative ring, `n` a natural number, and `i` a face index. This map `R → |
| 167 | C_n(ℝ^{n+1} \ {0}; R)` sends `1` to the `i`-th face of the affine simplex with vertices the |
| 168 | standard basis followed by `(-1, …, -1)`. Every such face avoids the origin. -/ |
| 169 | def standardSubspaceFaceChain (n : ℕ) (i : Fin (n + 2)) : |
| 170 | ModuleCat.of R R ⟶ |
| 171 | ((_root_.OAI.AlgebraicTopology.Singular.Cohomology.chainPairFunctor R).obj (puncturedPair ℝ (n + 1))).left.X n := |
| 172 | (TopCat.toSSet.obj (puncturedPair ℝ (n + 1)).snd).ιChainComplex |
| 173 | (standardFaceSimplex n i) |
| 174 | |
| 175 | lemma standardFaceChain_inclusion (n : ℕ) (i : Fin (n + 2)) : |
| 176 | standardSubspaceFaceChain R n i ≫ |
| 177 | ((_root_.OAI.AlgebraicTopology.Singular.Cohomology.chainPairFunctor R).obj (puncturedPair ℝ (n + 1))).hom.f n = |
| 178 | standardAmbientFaceChain R n i := by |
| 179 | change (TopCat.toSSet.obj (puncturedPair ℝ (n + 1)).snd).ιChainComplex |
| 180 | (standardFaceSimplex n i) ≫ |
| 181 | (SSet.chainComplexMap |
| 182 | (TopCat.toSSet.map (puncturedPair ℝ (n + 1)).map) |
| 183 | (ModuleCat.of R R)).f n = _ |
| 184 | rw [SSet.ι_chainComplexMap_f] |
| 185 | rfl |
| 186 | |
| 187 | lemma standardAmbientSimplexChain_boundary (n : ℕ) : |
| 188 | standardAmbientSimplexChain R (n + 1) ≫ |
| 189 | ((_root_.OAI.AlgebraicTopology.Singular.Cohomology.chainPairFunctor R).obj (puncturedPair ℝ (n + 1))).right.d (n + 1) n = |
| 190 | ∑ i : Fin (n + 2), (-1) ^ i.val • standardAmbientFaceChain R n i := |
| 191 | SSet.ιChainComplex_d |
| 192 | (TopCat.toSSet.obj (puncturedPair ℝ (n + 1)).fst) |
| 193 | (ModuleCat.of R R) (standardSingularSimplex (n + 1)) |
| 194 | |
| 195 | lemma standardAmbientFaceChain_projection (n : ℕ) (i : Fin (n + 2)) : |
| 196 | standardAmbientFaceChain R n i ≫ (standardLocalProjection R (n + 1)).f n = 0 := by |
| 197 | rw [← standardFaceChain_inclusion, Category.assoc, ← HomologicalComplex.comp_f, |
| 198 | standardLocalProjection, _root_.OAI.AlgebraicTopology.Singular.CohomologyTo.subspaceChainMap_relativeChainProjection, |
| 199 | HomologicalComplex.zero_f, comp_zero] |
| 200 | |
| 201 | lemma standardLocalChain_boundary_succ (n : ℕ) : |
| 202 | standardLocalChain R (n + 1) ≫ |
| 203 | (standardLocalRelativeChainComplex R (n + 1)).d (n + 1) n = 0 := by |
| 204 | rw [standardLocalChain, Category.assoc, (standardLocalProjection R (n + 1)).comm (n + 1) n, |
| 205 | ← Category.assoc, standardAmbientSimplexChain_boundary, Preadditive.sum_comp] |
| 206 | refine Finset.sum_eq_zero fun i _ => ?_ |
| 207 | rw [Preadditive.zsmul_comp, standardAmbientFaceChain_projection, smul_zero] |
| 208 | |
| 209 | lemma standardLocalChain_boundary (d : ℕ) : |
| 210 | standardLocalChain R d ≫ |
| 211 | (standardLocalRelativeChainComplex R d).d d ((ComplexShape.down ℕ).next d) = 0 := by |
| 212 | cases d with |
| 213 | | zero => simp |
| 214 | | succ n => rw [ChainComplex.next_nat_succ]; exact standardLocalChain_boundary_succ R n |
| 215 | |
| 216 | /-- Let `R` be a commutative ring and `d` a natural number. The chosen affine simplex in `ℝ^d` has |
| 217 | ordered vertices `e₀, …, e_{d-1}, (-1, …, -1)`, where the `e_j` are standard basis vectors. Its |
| 218 | boundary lies in `ℝ^d \ {0}`, so it defines a relative cycle. This map from `R` to relative |
| 219 | cycles sends `1` to that cycle. -/ |
| 220 | def standardLocalCycle (d : ℕ) : |
| 221 | ModuleCat.of R R ⟶ (standardLocalRelativeChainComplex R d).cycles d := |
| 222 | (standardLocalRelativeChainComplex R d).liftCycles (standardLocalChain R d) |
| 223 | ((ComplexShape.down ℕ).next d) rfl (standardLocalChain_boundary R d) |
| 224 | |
| 225 | /-- Let `R` be a commutative ring and `d` a natural number. The chosen affine simplex in `ℝ^d` has |
| 226 | ordered vertices `e₀, …, e_{d-1}, (-1, …, -1)`, where the `e_j` are standard basis vectors. This |
| 227 | is its class in `H_d(ℝ^d, ℝ^d \ {0}; R)`, with coefficient `1`. Its boundary vanishes in |
| 228 | relative chains because all faces avoid the origin. -/ |
| 229 | def standardLocalClass (d : ℕ) : _root_.OAI.AlgebraicTopology.Singular.Cohomology.RelativeHomology R (puncturedPair ℝ d) d := |
| 230 | ((standardLocalCycle R d ≫ (standardLocalRelativeChainComplex R d).homologyπ d).hom) 1 |
| 231 | |
| 232 | end Singular |
| 233 | end |
| 234 | |
| 235 | end |
| 236 | |
| 237 | end OAI.AlgebraicTopology.LocalHomology.FundamentalClass |