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.CohomologyTo |
| 18 | import Mathlib.Algebra.Category.Grp.Basic |
| 19 | import Mathlib.Algebra.Category.ModuleCat.Basic |
| 20 | import Mathlib.Algebra.Category.ModuleCat.Presheaf.Sheafification |
| 21 | import Mathlib.Algebra.Homology.Embedding.CochainComplex |
| 22 | import Mathlib.Topology.Sheaves.Abelian |
| 23 | import Mathlib.Topology.Sheaves.Sheafify |
| 24 | |
| 25 | /-! # Sheaf Chain -/ |
| 26 | |
| 27 | namespace OAI.AlgebraicTopology.Singular.SheafChain |
| 28 | |
| 29 | noncomputable section |
| 30 | |
| 31 | /-! |
| 32 | # The relative singular-chain sheaf complex |
| 33 | |
| 34 | This file constructs the presheaf of relative singular chain complexes |
| 35 | `U ↦ C_*(X, X ∖ U; R)`. For `V ⊆ U`, restriction is the relative chain map induced by |
| 36 | the identity map of `X` and the inclusion `X ∖ U ⊆ X ∖ V`. Degreewise sheafification gives a |
| 37 | complex of additive sheaves, then the grading embedding `n ↦ -n` gives a cochain complex |
| 38 | indexed by the integers. |
| 39 | |
| 40 | The conceptual model is the sheafification of relative singular chains described in |
| 41 | Baumann--Kamnitzer--Knutson, *The Mirković--Vilonen basis and Duistermaat--Heckman measures*, |
| 42 | §5.1, p. 24, <https://irma.math.unistra.fr/~baumann/mvbasis.pdf>. No external code is copied. |
| 43 | The sheafification implementation follows the existing `Singular.Sheaf.Cochain` module. |
| 44 | |
| 45 | This is a concrete candidate for the dualizing complex. Its dualizing property, the |
| 46 | identification with exceptional pullback, the orientation quasi-isomorphism, stalkwise local |
| 47 | homology, and the identification of its hypercohomology with intrinsic Borel--Moore homology are |
| 48 | all separate tasks. |
| 49 | -/ |
| 50 | |
| 51 | open _root_.CategoryTheory Limits _root_.TopologicalSpace |
| 52 | |
| 53 | universe u |
| 54 | |
| 55 | variable (R : Type u) [CommRing R] (X : TopCat.{u}) |
| 56 | |
| 57 | /-- The contravariant functor sending an open set `U` to the pair `(X, X ∖ U)`. -/ |
| 58 | def openComplementPairFunctor : (Opens X)ᵒᵖ ⥤ TopPair.{u} where |
| 59 | obj U := TopPair.ofSubset (U.unop : Set X)ᶜ |
| 60 | map i := CohomologyTo.supportInclusionPairMap X (leOfHom i.unop) |
| 61 | map_id U := CohomologyTo.supportInclusionPairMap_rfl X (U.unop : Set X) |
| 62 | map_comp i j := |
| 63 | CohomologyTo.supportInclusionPairMap_trans X (leOfHom j.unop) (leOfHom i.unop) |
| 64 | |
| 65 | /-- Let `X` be a topological space and `R` a commutative ring. This functor sends an open `U ⊆ X` to |
| 66 | the relative singular chain complex `C_*(X,X \ U;R) = C_*(X;R)/C_*(X \ U;R)`. For `V ⊆ U`, |
| 67 | restriction is the quotient map induced by `X \ U ⊆ X \ V`. -/ |
| 68 | def openRelativeSingularChainComplexFunctor : |
| 69 | (Opens X)ᵒᵖ ⥤ ChainComplex (ModuleCat.{u} R) ℕ := |
| 70 | openComplementPairFunctor X ⋙ Cohomology.relativeChainFunctor R |
| 71 | |
| 72 | /-- Relative chains of `(X, X ∖ U)` in degree `n`, forgetting only the scalar structure. -/ |
| 73 | def singularChainPresheaf (n : ℕ) : TopCat.Presheaf AddCommGrpCat.{u} X := |
| 74 | openRelativeSingularChainComplexFunctor R X ⋙ |
| 75 | HomologicalComplex.eval (ModuleCat.{u} R) (ComplexShape.down ℕ) n ⋙ |
| 76 | forget₂ (ModuleCat.{u} R) AddCommGrpCat.{u} |
| 77 | |
| 78 | /-- The restriction map is induced by the inclusion of complements. -/ |
| 79 | @[simp] lemma singularChainPresheaf_map {U V : Opens X} (i : V ⟶ U) (n : ℕ) : |
| 80 | (singularChainPresheaf R X n).map i.op = |
| 81 | (forget₂ (ModuleCat.{u} R) AddCommGrpCat.{u}).map |
| 82 | (((Cohomology.relativeChainFunctor R).map |
| 83 | (CohomologyTo.supportInclusionPairMap X (leOfHom i))).f n) := |
| 84 | rfl |
| 85 | |
| 86 | /-- The singular boundary in the relative-chain presheaves. -/ |
| 87 | def singularChainBoundary (n : ℕ) : |
| 88 | singularChainPresheaf R X (n + 1) ⟶ singularChainPresheaf R X n where |
| 89 | app U := (forget₂ (ModuleCat.{u} R) AddCommGrpCat.{u}).map |
| 90 | (((openRelativeSingularChainComplexFunctor R X).obj U).d (n + 1) n) |
| 91 | naturality {U V} i := by |
| 92 | exact congrArg ((forget₂ (ModuleCat.{u} R) AddCommGrpCat.{u}).map) |
| 93 | (((openRelativeSingularChainComplexFunctor R X).map i).comm (n + 1) n) |
| 94 | |
| 95 | /-- Consecutive relative singular boundaries compose to zero. -/ |
| 96 | lemma singularChainBoundary_comp (n : ℕ) : |
| 97 | singularChainBoundary R X (n + 1) ≫ singularChainBoundary R X n = 0 := |
| 98 | NatTrans.ext (funext fun U ↦ congrArg ((forget₂ (ModuleCat.{u} R) AddCommGrpCat.{u}).map) |
| 99 | (((openRelativeSingularChainComplexFunctor R X).obj U).d_comp_d (n + 2) (n + 1) n)) |
| 100 | |
| 101 | /-- The relative singular-chain complex as a complex of additive presheaves. -/ |
| 102 | def singularChainPresheafComplex : ChainComplex (TopCat.Presheaf AddCommGrpCat.{u} X) ℕ := |
| 103 | ChainComplex.of (singularChainPresheaf R X) (singularChainBoundary R X) |
| 104 | (singularChainBoundary_comp R X) |
| 105 | |
| 106 | @[simp] lemma singularChainPresheafComplex_d (n : ℕ) : |
| 107 | (singularChainPresheafComplex R X).d (n + 1) n = singularChainBoundary R X n := by |
| 108 | simp [singularChainPresheafComplex] |
| 109 | |
| 110 | /-- The sheaf of relative singular chains in degree `n`. -/ |
| 111 | def singularChainSheaf (n : ℕ) : TopCat.Sheaf AddCommGrpCat.{u} X := |
| 112 | (presheafToSheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}).obj |
| 113 | (singularChainPresheaf R X n) |
| 114 | |
| 115 | /-- The sheafified relative singular boundary. -/ |
| 116 | def singularChainSheafBoundary (n : ℕ) : |
| 117 | singularChainSheaf R X (n + 1) ⟶ singularChainSheaf R X n := |
| 118 | (presheafToSheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}).map |
| 119 | (singularChainBoundary R X n) |
| 120 | |
| 121 | /-- Let `X` be a topological space and `R` a commutative ring. This chain complex of sheaves of |
| 122 | abelian groups is obtained by sheafifying, in each nonnegative degree, the presheaf `U ↦ C_*(X,X |
| 123 | \ U;R)`. Its boundary is induced by the alternating sum of the faces of a singular simplex. -/ |
| 124 | def singularChainSheafComplex : ChainComplex (TopCat.Sheaf AddCommGrpCat.{u} X) ℕ := |
| 125 | ((presheafToSheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}).mapHomologicalComplex |
| 126 | (ComplexShape.down ℕ)).obj (singularChainPresheafComplex R X) |
| 127 | |
| 128 | @[simp] lemma singularChainSheafComplex_d (n : ℕ) : |
| 129 | (singularChainSheafComplex R X).d (n + 1) n = singularChainSheafBoundary R X n := by |
| 130 | change (presheafToSheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}).map |
| 131 | ((singularChainPresheafComplex R X).d (n + 1) n) = _ |
| 132 | rw [singularChainPresheafComplex_d] |
| 133 | rfl |
| 134 | |
| 135 | set_option backward.isDefEq.respectTransparency false in |
| 136 | /-- Let `X` be a topological space and `R` a commutative ring. This chain map sends the presheaf |
| 137 | complex `U ↦ C_*(X,X \ U;R)` to the underlying presheaf complex of its degreewise |
| 138 | sheafification. In each degree it takes a relative chain to the section represented by that |
| 139 | chain locally. -/ |
| 140 | def singularChainSheafificationUnit : |
| 141 | singularChainPresheafComplex R X ⟶ |
| 142 | ((TopCat.Sheaf.forget AddCommGrpCat.{u} X).mapHomologicalComplex |
| 143 | (ComplexShape.down ℕ)).obj (singularChainSheafComplex R X) where |
| 144 | f n := toSheafify (Opens.grothendieckTopology X) (singularChainPresheaf R X n) |
| 145 | comm' i j hij := by |
| 146 | obtain rfl := hij |
| 147 | rw [Functor.mapHomologicalComplex_obj_d, singularChainPresheafComplex_d, |
| 148 | singularChainSheafComplex_d] |
| 149 | dsimp [singularChainSheafBoundary, singularChainSheaf] |
| 150 | exact (toSheafify_naturality (Opens.grothendieckTopology X) |
| 151 | (singularChainBoundary R X j)).symm |
| 152 | |
| 153 | /-- Sheafification does not change the stalk of the relative-chain presheaf in any degree. -/ |
| 154 | instance singularChainSheafificationUnit_stalk_isIso (x : X) (n : ℕ) : |
| 155 | IsIso ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map |
| 156 | ((singularChainSheafificationUnit R X).f n)) := |
| 157 | TopCat.Presheaf.stalkFunctor_map_unit_toSheafify_isIso x AddCommGrpCat.{u} |
| 158 | (singularChainPresheaf R X n) |
| 159 | |
| 160 | /-- The sheafified relative singular-chain model with the cohomological grading convention: |
| 161 | homological degree `n` occupies cohomological degree `-n`, and positive degrees are zero. -/ |
| 162 | def singularChainSheafCochainComplex : CochainComplex (TopCat.Sheaf AddCommGrpCat.{u} X) ℤ := |
| 163 | (singularChainSheafComplex R X).extend ComplexShape.embeddingDownNat |
| 164 | |
| 165 | /-- The integer-graded chain sheaf has no terms in positive degrees. -/ |
| 166 | instance singularChainSheafCochainComplex_isStrictlyLE : |
| 167 | (singularChainSheafCochainComplex R X).IsStrictlyLE 0 := by |
| 168 | unfold singularChainSheafCochainComplex |
| 169 | infer_instance |
| 170 | |
| 171 | end |
| 172 | |
| 173 | end OAI.AlgebraicTopology.Singular.SheafChain |