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.Definitions.AlgebraicTopology.Support.Cohomology |
| 20 | import HodgeConjecture.Definitions.AlgebraicTopology.Support.DerivedSectionsLocalization |
| 21 | import HodgeConjecture.Definitions.AlgebraicTopology.Support.SectionRestrictionCone |
| 22 | import HodgeConjecture.Lemmas.AlgebraicTopology.Support.DerivedSectionsNaturality |
| 23 | import HodgeConjecture.Lemmas.AlgebraicTopology.Support.FlasqueSections |
| 24 | import HodgeConjecture.Mathlib.Algebra.Homology.DerivedCategory.KInjectiveHom |
| 25 | import HodgeConjecture.Mathlib.Algebra.Homology.HomComplexSingle |
| 26 | import Mathlib.Algebra.Homology.DerivedCategory.Ext.Basic |
| 27 | |
| 28 | import HodgeConjecture.Mathlib.Algebra.Homology.Notation |
| 29 | |
| 30 | namespace OAI.AlgebraicTopology.Support.CohomologyInjectiveModel |
| 31 | |
| 32 | open _root_.TopCat |
| 33 | open _root_.TopCat.Sheaf |
| 34 | |
| 35 | /-! |
| 36 | # Cohomology with support computed by an injective resolution |
| 37 | |
| 38 | For opens `W = V ⊓ U ≤ V`, morphisms `ℤ[V, W] → G` are the sections of `G` over `V` that vanish |
| 39 | on `W`, that is `Γ_{X ∖ U}(V, G)`. For a K-injective resolution `F → I` this identifies the |
| 40 | cohomology of the pair `H^n(V, W; F)` with `H^n(Γ_{X ∖ U}(V, I))`. |
| 41 | -/ |
| 42 | |
| 43 | noncomputable section |
| 44 | |
| 45 | open _root_.CategoryTheory Limits Abelian Opposite _root_.TopologicalSpace |
| 46 | |
| 47 | namespace TopCat |
| 48 | open _root_.TopCat |
| 49 | namespace Sheaf |
| 50 | open _root_.TopCat |
| 51 | open _root_.TopCat.Sheaf |
| 52 | |
| 53 | variable (X : TopCat.{0}) |
| 54 | |
| 55 | /-- `Γ_{X ∖ U}(V, G) ≅ ker(G(V) → G(W))` when `W = V ⊓ U`. -/ |
| 56 | def supportedSectionsIsoKer (U V W : Opens X) (hW : V ⊓ U = W) |
| 57 | (G : Sheaf AddCommGrpCat X) : |
| 58 | ((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).obj G).obj.obj (op V) ≅ |
| 59 | AddCommGrpCat.of (G.obj.map (homOfLE (hW ▸ inf_le_left : W ≤ V)).op).hom.ker := by |
| 60 | subst hW |
| 61 | exact _root_.OAI.AlgebraicTopology.Support.DerivedSectionsOn.TopCat.Sheaf.sheafSectionsSupportedOutsideOnOpenIso X U V G ≪≫ |
| 62 | (kernelCompMono _ (_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.supportedOutsideIntersectionIso X U V G).hom).symm ≪≫ |
| 63 | kernelIsoOfEq (_root_.OAI.AlgebraicTopology.Support.FlasqueSections.TopCat.Sheaf.toOpenRestrictionPushforward_intersection X U V G) ≪≫ |
| 64 | AddCommGrpCat.kernelIsoKer _ |
| 65 | |
| 66 | lemma supportedSectionsIsoKer_hom_subtype (U V W : Opens X) (hW : V ⊓ U = W) |
| 67 | (G : Sheaf AddCommGrpCat X) : |
| 68 | (supportedSectionsIsoKer X U V W hW G).hom ≫ AddCommGrpCat.ofHom (AddSubgroup.subtype _) = |
| 69 | ((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X U).app G).hom.app (op V) := by |
| 70 | subst hW |
| 71 | simp [supportedSectionsIsoKer, kernelCompMono] |
| 72 | |
| 73 | |
| 74 | /-- `Γ_{X ∖ U}(V, K) → Γ_{X ∖ U'}(V', K)` for `U' ≤ U` and `V' ≤ V`: enlarge the support, then |
| 75 | restrict the sections. -/ |
| 76 | def supportedSectionsRestriction {U U' V V' : Opens X} (hU : U' ≤ U) (hV : V' ≤ V) |
| 77 | (K : CochainComplex (Sheaf AddCommGrpCat X) ℤ) : |
| 78 | ((_root_.OAI.AlgebraicTopology.Support.DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X V).mapHomologicalComplex ℤᵘᵖ).obj |
| 79 | (((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).mapHomologicalComplex ℤᵘᵖ).obj K) ⟶ |
| 80 | ((_root_.OAI.AlgebraicTopology.Support.DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X V').mapHomologicalComplex ℤᵘᵖ).obj |
| 81 | (((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U').mapHomologicalComplex ℤᵘᵖ).obj K) := |
| 82 | ((_root_.OAI.AlgebraicTopology.Support.DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X V).mapHomologicalComplex ℤᵘᵖ).map |
| 83 | (((_root_.OAI.AlgebraicTopology.Support.DerivedSectionsNaturality.TopCat.Sheaf.sheafSectionsSupportedOutsideMap X hU).mapHomologicalComplex ℤᵘᵖ).app K) ≫ |
| 84 | _root_.OAI.AlgebraicTopology.Support.SectionRestrictionCone.TopCat.Sheaf.sectionComplexRestriction X ℤᵘᵖ _ (homOfLE hV) |
| 85 | |
| 86 | set_option linter.auxLemma false |
| 87 | attribute [local implicit_reducible] TopCat.Sheaf TopCat.instCategorySheaf._aux_1 |
| 88 | TopCat.instCategorySheaf._aux_3 TopCat.instCategorySheaf._aux_5 |
| 89 | |
| 90 | variable (U V W : Opens X) (hW : V ⊓ U = W) |
| 91 | |
| 92 | /-- The pair sheaf `ℤ[V, W]` for `W = V ⊓ U`, as an object of the site category. -/ |
| 93 | abbrev pairSheaf' : CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat := |
| 94 | _root_.OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.pairSheaf (homOfLE (hW ▸ inf_le_left : W ≤ V)) |
| 95 | |
| 96 | /-- Evaluation of a morphism `ℤ[V, W] ⟶ G` at the generator, as a section of `G` over `V`. -/ |
| 97 | def pairSheafHomEvaluation (G : Sheaf AddCommGrpCat X) : |
| 98 | (preadditiveCoyoneda.obj (op (pairSheaf' X U V W hW))).obj G ⟶ G.obj.obj (op V) := |
| 99 | AddCommGrpCat.ofHom |
| 100 | ((_root_.OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.freeAbelianSheafHomAddEquiv V G).toAddMonoidHom.comp |
| 101 | (preadditiveCoyoneda.map (cokernel.π _).op |>.app G).hom) |
| 102 | |
| 103 | lemma pairSheafHomEvaluation_naturality {G G' : Sheaf AddCommGrpCat X} (g : G ⟶ G') : |
| 104 | pairSheafHomEvaluation X U V W hW G ≫ g.hom.app (op V) = |
| 105 | (preadditiveCoyoneda.obj (op (pairSheaf' X U V W hW))).map g ≫ |
| 106 | pairSheafHomEvaluation X U V W hW G' := rfl |
| 107 | |
| 108 | /-- `Hom(ℤ[V, W], G) ≅ Γ_{X ∖ U}(V, G)`. -/ |
| 109 | def pairSheafHomIsoSupportedSections (G : Sheaf AddCommGrpCat X) : |
| 110 | (preadditiveCoyoneda.obj (op (pairSheaf' X U V W hW))).obj G ≅ |
| 111 | ((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).obj G).obj.obj (op V) := |
| 112 | (_root_.OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.pairSheafHomAddEquiv _ G).toAddCommGrpIso ≪≫ |
| 113 | (supportedSectionsIsoKer X U V W hW G).symm |
| 114 | |
| 115 | lemma pairSheafHomIsoSupportedSections_hom_inclusion (G : Sheaf AddCommGrpCat X) : |
| 116 | (pairSheafHomIsoSupportedSections X U V W hW G).hom ≫ |
| 117 | ((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X U).app G).hom.app (op V) = |
| 118 | pairSheafHomEvaluation X U V W hW G := by |
| 119 | rw [← supportedSectionsIsoKer_hom_subtype X U V W hW G, pairSheafHomIsoSupportedSections, |
| 120 | Iso.trans_hom, |
| 121 | Category.assoc, Iso.symm_hom, Iso.inv_hom_id_assoc] |
| 122 | rfl |
| 123 | |
| 124 | instance (G : Sheaf AddCommGrpCat X) : |
| 125 | Mono (((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X U).app G).hom.app (op V)) := by |
| 126 | rw [← _root_.OAI.AlgebraicTopology.Support.DerivedSectionsOn.TopCat.Sheaf.sheafSectionsSupportedOutsideOnOpenIso_hom_ι] |
| 127 | infer_instance |
| 128 | |
| 129 | lemma pairSheafHomIsoSupportedSections_naturality {G G' : Sheaf AddCommGrpCat X} (g : G ⟶ G') : |
| 130 | (pairSheafHomIsoSupportedSections X U V W hW G).hom ≫ |
| 131 | ((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).map g).hom.app (op V) = |
| 132 | (preadditiveCoyoneda.obj (op (pairSheaf' X U V W hW))).map g ≫ |
| 133 | (pairSheafHomIsoSupportedSections X U V W hW G').hom := by |
| 134 | apply (cancel_mono (((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X U).app G').hom.app (op V))).1 |
| 135 | rw [Category.assoc, Category.assoc, pairSheafHomIsoSupportedSections_hom_inclusion, |
| 136 | ← pairSheafHomEvaluation_naturality, ← pairSheafHomIsoSupportedSections_hom_inclusion, |
| 137 | Category.assoc] |
| 138 | congr 1 |
| 139 | exact (congrArg (fun h => h.hom.app (op V)) |
| 140 | ((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X U).naturality g)) |
| 141 | |
| 142 | /-- `Hom^•(ℤ[V, W][0], K) ≅ Γ_{X ∖ U}(V, K)` for a complex of sheaves `K`. -/ |
| 143 | def homComplexPairSheafIsoSupportedSections |
| 144 | (K : CochainComplex (CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat) ℤ) : |
| 145 | CochainComplex.HomComplex |
| 146 | ((CochainComplex.singleFunctor _ 0).obj (pairSheaf' X U V W hW)) K ≅ |
| 147 | ((_root_.OAI.AlgebraicTopology.Support.DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X V).mapHomologicalComplex ℤᵘᵖ).obj |
| 148 | (((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).mapHomologicalComplex ℤᵘᵖ).obj K) := |
| 149 | _root_.OAI.Algebra.Homology.HomComplexSingle.CochainComplex.HomComplex.fromSingleZeroIsoPreadditiveCoyoneda _ K ≪≫ |
| 150 | HomologicalComplex.Hom.isoOfComponents |
| 151 | (fun n => pairSheafHomIsoSupportedSections X U V W hW (K.X n)) |
| 152 | (fun i j _ => pairSheafHomIsoSupportedSections_naturality X U V W hW (K.d i j)) |
| 153 | |
| 154 | variable [HasExt.{1} (CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat)] |
| 155 | |
| 156 | local instance instHasDerivedCategorySheafOpensCarrierGrothendieckTopologyAddCommGrpCat_oAI : |
| 157 | HasDerivedCategory (CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat) := |
| 158 | HasDerivedCategory.standard _ |
| 159 | |
| 160 | /-- `H^n(V, W; F) ≃ H^n(Γ_{X ∖ U}(V, I))` for a K-injective resolution `F[0] → I` of `F`. -/ |
| 161 | def relHAddEquivSupportedSectionsHomology (F : CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat) |
| 162 | (I : CochainComplex (CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat) ℤ) [I.IsKInjective] |
| 163 | (ι : (CochainComplex.singleFunctor _ 0).obj F ⟶ I) [QuasiIso ι] (n : ℕ) : |
| 164 | _root_.OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.relH F n (homOfLE (hW ▸ inf_le_left : W ≤ V)) ≃+ |
| 165 | (((_root_.OAI.AlgebraicTopology.Support.DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X V).mapHomologicalComplex ℤᵘᵖ).obj |
| 166 | (((_root_.OAI.AlgebraicTopology.Support.DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).mapHomologicalComplex ℤᵘᵖ).obj |
| 167 | I)).homology n := |
| 168 | haveI : IsIso (DerivedCategory.Q.map ι) := (DerivedCategory.isIso_Q_map_iff_quasiIso (φ := ι)).2 |
| 169 | inferInstance |
| 170 | Ext.homAddEquiv.trans <| |
| 171 | (show ShiftedHom (DerivedCategory.Q.obj |
| 172 | ((CochainComplex.singleFunctor _ 0).obj (pairSheaf' X U V W hW))) |
| 173 | (DerivedCategory.Q.obj ((CochainComplex.singleFunctor _ 0).obj F)) (n : ℤ) ≃+ |
| 174 | ShiftedHom (DerivedCategory.Q.obj |
| 175 | ((CochainComplex.singleFunctor _ 0).obj (pairSheaf' X U V W hW))) |
| 176 | (DerivedCategory.Q.obj I) (n : ℤ) from |
| 177 | _root_.OAI.Algebra.Homology.DerivedCategoryInjectiveHom.CategoryTheory.isoHomCongrAddEquiv (Iso.refl _) |
| 178 | ((shiftFunctor _ (n : ℤ)).mapIso (asIso (DerivedCategory.Q.map ι)))).trans <| |
| 179 | (_root_.OAI.Algebra.Homology.DerivedCategoryInjectiveHom.CochainComplex.kInjectiveDerivedHomAddEquivCohomologyClass _ I n).trans <| |
| 180 | (CochainComplex.HomComplex.homologyAddEquiv _ I n).symm.trans |
| 181 | (HomologicalComplex.homologyMapIso |
| 182 | (homComplexPairSheafIsoSupportedSections X U V W hW I) n).addCommGroupIsoToAddEquiv |
| 183 | |
| 184 | end Sheaf |
| 185 | end TopCat |
| 186 | |
| 187 | end |
| 188 | |
| 189 | end OAI.AlgebraicTopology.Support.CohomologyInjectiveModel |