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.Support.CohomologyInjectiveModel |
| 18 | import OAI.AlgebraicTopology.Support.FlasqueComparison |
| 19 | import OAI.AlgebraicTopology.Sheaf.InjectiveFlasque |
| 20 | import OAI.Algebra.Homology.LiftToInjective |
| 21 | import Mathlib.CategoryTheory.Abelian.Injective.Resolution |
| 22 | import Mathlib.CategoryTheory.Abelian.GrothendieckCategory.EnoughInjectives |
| 23 | import Mathlib.Algebra.Homology.DerivedCategory.KInjective |
| 24 | import OAI.Algebra.Homology.Notation |
| 25 | |
| 26 | /-! # Cohomology Flasque Model -/ |
| 27 | |
| 28 | namespace OAI.AlgebraicTopology.Support.CohomologyFlasqueModel.TopCat.Sheaf |
| 29 | |
| 30 | noncomputable section |
| 31 | |
| 32 | open _root_.TopCat |
| 33 | open _root_.TopCat.Sheaf |
| 34 | |
| 35 | /-! |
| 36 | # Cohomology with support computed by a flasque resolution |
| 37 | |
| 38 | For a bounded-below resolution `F → K` by flasque sheaves, `H^n(V, V ⊓ U; F)` is the cohomology |
| 39 | of the supported sections `Γ_{X ∖ U}(V, K)`. The proof compares `K` with a chosen injective |
| 40 | resolution of `F`. |
| 41 | -/ |
| 42 | |
| 43 | open _root_.CategoryTheory Limits Abelian Opposite _root_.TopologicalSpace |
| 44 | |
| 45 | variable (X : TopCat.{0}) (F : Sheaf AddCommGrpCat X) |
| 46 | |
| 47 | set_option backward.isDefEq.respectTransparency false in |
| 48 | /-- A chosen injective resolution `I` of `F`, indexed by integers. -/ |
| 49 | def injectiveResolutionComplex : CochainComplex (Sheaf AddCommGrpCat X) ℤ := |
| 50 | (injectiveResolution (C := Sheaf AddCommGrpCat.{0} X) F).cocomplex.extend |
| 51 | ComplexShape.embeddingUpNat |
| 52 | |
| 53 | set_option backward.isDefEq.respectTransparency false in |
| 54 | /-- The augmentation `F[0] → I`. -/ |
| 55 | def injectiveResolutionAugmentation : |
| 56 | (CochainComplex.singleFunctor _ 0).obj F ⟶ injectiveResolutionComplex X F := |
| 57 | (HomologicalComplex.extendSingleIso ComplexShape.embeddingUpNat F 0 0 rfl).inv ≫ |
| 58 | HomologicalComplex.extendMap (injectiveResolution (C := Sheaf AddCommGrpCat.{0} X) F).ι |
| 59 | ComplexShape.embeddingUpNat |
| 60 | |
| 61 | set_option backward.isDefEq.respectTransparency false in |
| 62 | instance injectiveResolutionComplex_injective (q : ℤ) : |
| 63 | Injective ((injectiveResolutionComplex X F).X q) := |
| 64 | OAI.Algebra.Homology.LiftToInjective.CochainComplex.injective_extend_nat _ |
| 65 | (injectiveResolution (C := Sheaf AddCommGrpCat.{0} X) F).injective q |
| 66 | |
| 67 | instance injectiveResolutionComplex_isStrictlyGE : |
| 68 | (injectiveResolutionComplex X F).IsStrictlyGE 0 := by |
| 69 | dsimp only [injectiveResolutionComplex] |
| 70 | infer_instance |
| 71 | |
| 72 | set_option backward.isDefEq.respectTransparency false in |
| 73 | instance injectiveResolutionAugmentation_quasiIso : |
| 74 | QuasiIso (injectiveResolutionAugmentation X F) := by |
| 75 | dsimp only [injectiveResolutionAugmentation] |
| 76 | have : QuasiIso (HomologicalComplex.extendMap |
| 77 | (injectiveResolution (C := Sheaf AddCommGrpCat.{0} X) F).ι ComplexShape.embeddingUpNat) := |
| 78 | (HomologicalComplex.quasiIso_extendMap_iff _ _).mpr inferInstance |
| 79 | infer_instance |
| 80 | |
| 81 | local instance : HasDerivedCategory (Sheaf AddCommGrpCat X) := |
| 82 | HasDerivedCategory.standard _ |
| 83 | |
| 84 | instance injectiveResolutionComplex_isKInjective : |
| 85 | (injectiveResolutionComplex X F).IsKInjective := |
| 86 | CochainComplex.isKInjective_of_injective _ 0 |
| 87 | |
| 88 | variable (K : CochainComplex (Sheaf AddCommGrpCat X) ℤ) [K.IsStrictlyGE 0] |
| 89 | (ι : (CochainComplex.singleFunctor _ 0).obj F ⟶ K) [Mono ι] [QuasiIso ι] |
| 90 | |
| 91 | /-- A chosen map `K → I` under `F[0]`. -/ |
| 92 | def resolutionToInjective : K ⟶ injectiveResolutionComplex X F := |
| 93 | OAI.Algebra.Homology.LiftToInjective.CochainComplex.liftToInjective ι (injectiveResolutionAugmentation X F) (fun _ => inferInstance) |
| 94 | |
| 95 | lemma comp_resolutionToInjective : |
| 96 | ι ≫ resolutionToInjective X F K ι = injectiveResolutionAugmentation X F := |
| 97 | OAI.Algebra.Homology.LiftToInjective.CochainComplex.comp_liftToInjective ι _ _ |
| 98 | |
| 99 | instance resolutionToInjective_quasiIso : QuasiIso (resolutionToInjective X F K ι) := by |
| 100 | have : QuasiIso (ι ≫ resolutionToInjective X F K ι) := by |
| 101 | rw [comp_resolutionToInjective] |
| 102 | infer_instance |
| 103 | exact quasiIso_of_comp_left ι _ |
| 104 | |
| 105 | variable (U V W : Opens X) (hW : V ⊓ U = W) (hK : ∀ n, IsFlasque (K.X n)) |
| 106 | |
| 107 | include hK in |
| 108 | lemma supportedSections_map_resolutionToInjective_quasiIso : |
| 109 | QuasiIso (((DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X V).mapHomologicalComplex ℤᵘᵖ).map |
| 110 | (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).mapHomologicalComplex ℤᵘᵖ).map |
| 111 | (resolutionToInjective X F K ι))) := |
| 112 | FlasqueComparison.TopCat.Sheaf.supportedSections_map_quasiIso_of_flasque X U V (resolutionToInjective X F K ι) 0 0 hK |
| 113 | (fun _ => AlgebraicTopology.Sheaf.InjectiveFlasque.TopCat.injective_isFlasque X _) |
| 114 | |
| 115 | attribute [local implicit_reducible] TopCat.Sheaf TopCat.instCategorySheaf |
| 116 | TopCat.Sheaf.instAbelian |
| 117 | |
| 118 | variable [HasExt.{1} (CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat)] |
| 119 | |
| 120 | /-- `H^n(V, W; F) ≃ H^n(Γ_{X ∖ U}(V, K))` for a bounded-below flasque resolution `F[0] → K`. -/ |
| 121 | def relHAddEquivSupportedSectionsHomologyOfFlasque (n : ℕ) : |
| 122 | OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.relH F n (homOfLE (hW ▸ inf_le_left : W ≤ V)) ≃+ |
| 123 | (((DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X V).mapHomologicalComplex ℤᵘᵖ).obj |
| 124 | (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).mapHomologicalComplex ℤᵘᵖ).obj K)).homology n := |
| 125 | haveI := supportedSections_map_resolutionToInjective_quasiIso X F K ι U V hK |
| 126 | (@CohomologyInjectiveModel.TopCat.Sheaf.relHAddEquivSupportedSectionsHomology X U V W hW _ F (injectiveResolutionComplex X F) |
| 127 | (injectiveResolutionComplex_isKInjective X F) (injectiveResolutionAugmentation X F) |
| 128 | (injectiveResolutionAugmentation_quasiIso X F) n).trans |
| 129 | (asIso (HomologicalComplex.homologyMap (((DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X V).mapHomologicalComplex ℤᵘᵖ).map |
| 130 | (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X U).mapHomologicalComplex ℤᵘᵖ).map |
| 131 | (resolutionToInjective X F K ι))) n)).symm.addCommGroupIsoToAddEquiv |
| 132 | |
| 133 | end |
| 134 | |
| 135 | end OAI.AlgebraicTopology.Support.CohomologyFlasqueModel.TopCat.Sheaf |