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