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 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | This file has been modified. |
| 5 | -/ |
| 6 | import OAI.Algebra.Homology.Notation |
| 7 | import OAI.AlgebraicTopology.Support.NestedLocalization |
| 8 | import OAI.AlgebraicTopology.Support.FlasqueSections |
| 9 | import OAI.AlgebraicTopology.Support.SectionRestrictionIs |
| 10 | |
| 11 | /-! # Nested On Open -/ |
| 12 | |
| 13 | namespace OAI.AlgebraicTopology.Support.NestedOnOpen.TopCat.Sheaf |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | open _root_.TopCat |
| 18 | open _root_.TopCat.Sheaf |
| 19 | |
| 20 | /-! |
| 21 | # The open-set model of the last localization term |
| 22 | |
| 23 | For `V ≤ U`, global sections of the sheaf of sections on `U` vanishing on `V` are |
| 24 | canonically sections on `U` of the sheaf of ambient sections vanishing on `V`, both sides |
| 25 | being the kernel of restriction `F(U) → F(V)`. The comparison is functorial in the |
| 26 | coefficient sheaf, so it identifies the last complex in nested-support localization with |
| 27 | the supported-section complex on the complement of the smaller closed support. |
| 28 | -/ |
| 29 | |
| 30 | open _root_.CategoryTheory Limits _root_.TopologicalSpace Opposite |
| 31 | |
| 32 | universe u |
| 33 | |
| 34 | variable (X : TopCat.{u}) |
| 35 | |
| 36 | theorem openRestrictionImage_top (U : Opens X) : |
| 37 | DerivedSectionsNaturality.TopCat.Sheaf.openRestrictionImage X U ⊤ = U := by simp |
| 38 | |
| 39 | theorem openRestrictionImage_eq_of_le {U V : Opens X} (h : V ≤ U) : |
| 40 | DerivedSectionsNaturality.TopCat.Sheaf.openRestrictionImage X V U = V := by simp_all |
| 41 | |
| 42 | /-- Let `X` be a topological space and `U ⊆ X` open, with inclusion `j`. This natural isomorphism |
| 43 | identifies `Γ(X, j_*(F|_U))` with `F(U)` for every sheaf of abelian groups `F`. -/ |
| 44 | def openRestrictionPushforwardTopEvaluationIso (U : Opens X) : |
| 45 | DerivedSections.TopCat.Sheaf.openRestrictionPushforward X U ⋙ DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X ⊤ ≅ DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X U := |
| 46 | NatIso.ofComponents (fun F => |
| 47 | F.obj.mapIso (eqToIso (congrArg op (openRestrictionImage_top X U)))) |
| 48 | (fun f => (f.hom.naturality _).symm) |
| 49 | |
| 50 | /-- Let `V ⊆ U` be open subsets of a topological space `X`, and let `F` be a sheaf of abelian |
| 51 | groups. This includes the kernel sheaf of `j_{U*}(F|_U) → j_{V*}(F|_V)` into `j_{U*}(F|_U)`. On |
| 52 | an open `W` it includes sections over `W ∩ U` vanishing on `W ∩ V` into all sections over `W ∩ |
| 53 | U`. -/ |
| 54 | def sheafSectionsBetweenOpensInclusion {U V : Opens X} (h : V ≤ U) : |
| 55 | NestedLocalization.TopCat.Sheaf.sheafSectionsBetweenOpens X h ⟶ DerivedSections.TopCat.Sheaf.openRestrictionPushforward X U where |
| 56 | app F := kernel.ι ((DerivedSectionsNaturality.TopCat.Sheaf.openRestrictionPushforwardMap X h).app F) |
| 57 | naturality F G f := by simp [NestedLocalization.TopCat.Sheaf.sheafSectionsBetweenOpens] |
| 58 | |
| 59 | variable {U V : Opens X} (h : V ≤ U) |
| 60 | |
| 61 | /-- Let `V ⊆ U` be open subsets of a topological space `X`, and let `F` be a sheaf of abelian |
| 62 | groups. This identifies global sections of `j_{V*}(F|_V)` with its sections over `U`: both |
| 63 | groups are `F(V)` because `V ⊆ U`. -/ |
| 64 | def nestedSupportRestrictionTargetIso (F : Sheaf AddCommGrpCat.{u} X) : |
| 65 | ((DerivedSections.TopCat.Sheaf.openRestrictionPushforward X V).obj F).obj.obj (op ⊤) ≅ |
| 66 | ((DerivedSections.TopCat.Sheaf.openRestrictionPushforward X V).obj F).obj.obj (op U) := |
| 67 | F.obj.mapIso (eqToIso (congrArg op |
| 68 | ((openRestrictionImage_top X V).trans (openRestrictionImage_eq_of_le X h).symm))) |
| 69 | |
| 70 | /-- The comparison of the two restriction arrows is the presheaf restriction square. -/ |
| 71 | @[reassoc] |
| 72 | theorem nestedSupportRestrictionTargetIso_square (F : Sheaf AddCommGrpCat.{u} X) : |
| 73 | (((DerivedSectionsNaturality.TopCat.Sheaf.openRestrictionPushforwardMap X h).app F).hom.app (op ⊤)) ≫ |
| 74 | (nestedSupportRestrictionTargetIso X h F).hom = |
| 75 | (openRestrictionPushforwardTopEvaluationIso X U).hom.app F ≫ |
| 76 | (((DerivedSections.TopCat.Sheaf.toOpenRestrictionPushforward X V).app F).hom.app (op U)) := by |
| 77 | change F.obj.map _ ≫ F.obj.map _ = F.obj.map _ ≫ F.obj.map _ |
| 78 | rw [← F.obj.map_comp, ← F.obj.map_comp] |
| 79 | congr 1 |
| 80 | |
| 81 | /-- Let `V ⊆ U` be open subsets of a topological space `X`, and let `F` be a sheaf of abelian |
| 82 | groups. This identifies global sections of `ker(j_{U*}(F|_U) → j_{V*}(F|_V))` with sections over |
| 83 | `U` of the subsheaf of `F` supported in `X \ V`. Both are the kernel of `F(U) → F(V)`. -/ |
| 84 | def sheafSectionsBetweenOpensGlobalIso (F : Sheaf AddCommGrpCat.{u} X) : |
| 85 | ((NestedLocalization.TopCat.Sheaf.sheafSectionsBetweenOpens X h).obj F).obj.obj (op ⊤) ≅ |
| 86 | ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X V).obj F).obj.obj (op U) := |
| 87 | NestedLocalization.TopCat.Sheaf.sheafSectionsBetweenOpensOnOpenIso X h ⊤ F ≪≫ |
| 88 | kernel.mapIso _ _ ((openRestrictionPushforwardTopEvaluationIso X U).app F) |
| 89 | (nestedSupportRestrictionTargetIso X h F) |
| 90 | (nestedSupportRestrictionTargetIso_square X h F) ≪≫ |
| 91 | (DerivedSectionsOn.TopCat.Sheaf.sheafSectionsSupportedOutsideOnOpenIso X V U F).symm |
| 92 | |
| 93 | set_option backward.isDefEq.respectTransparency false in |
| 94 | set_option backward.defeqAttrib.useBackward true in |
| 95 | /-- The comparison preserves the inclusion into sections on `U`. -/ |
| 96 | @[reassoc (attr := simp)] |
| 97 | theorem sheafSectionsBetweenOpensGlobalIso_hom_inclusion |
| 98 | (F : Sheaf AddCommGrpCat.{u} X) : |
| 99 | (sheafSectionsBetweenOpensGlobalIso X h F).hom ≫ |
| 100 | ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X V).app F).hom.app (op U) = |
| 101 | ((sheafSectionsBetweenOpensInclusion X h).app F).hom.app (op ⊤) ≫ |
| 102 | (openRestrictionPushforwardTopEvaluationIso X U).hom.app F := by |
| 103 | rw [← DerivedSectionsOn.TopCat.Sheaf.sheafSectionsSupportedOutsideOnOpenIso_hom_ι X V U F] |
| 104 | simp only [sheafSectionsBetweenOpensGlobalIso, Iso.trans_hom, Iso.symm_hom, |
| 105 | Category.assoc, Iso.inv_hom_id_assoc, kernel.mapIso_hom, kernel.map, |
| 106 | kernel.lift_ι] |
| 107 | rw [NestedLocalization.TopCat.Sheaf.sheafSectionsBetweenOpensOnOpenIso_hom_ι_assoc] |
| 108 | rfl |
| 109 | |
| 110 | set_option backward.isDefEq.respectTransparency false in |
| 111 | set_option backward.defeqAttrib.useBackward true in |
| 112 | /-- Naturality in the coefficient sheaf. -/ |
| 113 | @[reassoc] |
| 114 | theorem sheafSectionsBetweenOpensGlobalIso_naturality |
| 115 | {F G : Sheaf AddCommGrpCat.{u} X} (f : F ⟶ G) : |
| 116 | (((NestedLocalization.TopCat.Sheaf.sheafSectionsBetweenOpens X h).map f).hom.app (op ⊤)) ≫ |
| 117 | (sheafSectionsBetweenOpensGlobalIso X h G).hom = |
| 118 | (sheafSectionsBetweenOpensGlobalIso X h F).hom ≫ |
| 119 | (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X V).map f).hom.app (op U)) := by |
| 120 | have : Mono (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X V).app G).hom.app (op U)) := by |
| 121 | rw [← DerivedSectionsOn.TopCat.Sheaf.sheafSectionsSupportedOutsideOnOpenIso_hom_ι X V U G] |
| 122 | infer_instance |
| 123 | apply (cancel_mono (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X V).app G).hom.app (op U))).1 |
| 124 | rw [Category.assoc, sheafSectionsBetweenOpensGlobalIso_hom_inclusion] |
| 125 | have h₁ := congrArg (fun q => q.hom.app (op ⊤)) |
| 126 | ((sheafSectionsBetweenOpensInclusion X h).naturality f) |
| 127 | have h₂ := congrArg (fun q => q.hom.app (op U)) |
| 128 | ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X V).naturality f) |
| 129 | change (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X V).map f).hom.app (op U)) ≫ |
| 130 | ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X V).app G).hom.app (op U) = |
| 131 | ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X V).app F).hom.app (op U) ≫ |
| 132 | f.hom.app (op U) at h₂ |
| 133 | change (((NestedLocalization.TopCat.Sheaf.sheafSectionsBetweenOpens X h).map f).hom.app (op ⊤)) ≫ |
| 134 | ((sheafSectionsBetweenOpensInclusion X h).app G).hom.app (op ⊤) = |
| 135 | ((sheafSectionsBetweenOpensInclusion X h).app F).hom.app (op ⊤) ≫ |
| 136 | (((DerivedSections.TopCat.Sheaf.openRestrictionPushforward X U).map f).hom.app (op ⊤)) at h₁ |
| 137 | rw [Category.assoc, h₂, sheafSectionsBetweenOpensGlobalIso_hom_inclusion_assoc] |
| 138 | rw [← Category.assoc, h₁, Category.assoc] |
| 139 | exact congrArg (fun q => |
| 140 | ((sheafSectionsBetweenOpensInclusion X h).app F).hom.app (op ⊤) ≫ q) |
| 141 | ((openRestrictionPushforwardTopEvaluationIso X U).hom.naturality f) |
| 142 | |
| 143 | /-- Let `V ⊆ U` be open subsets of a topological space `X`. For each sheaf `F` of abelian groups, |
| 144 | global sections of the kernel sheaf of restriction from `U` to `V` equal sections of `F` over |
| 145 | `U` vanishing on `V`. This is that identification as a natural isomorphism in `F`. -/ |
| 146 | def sheafSectionsBetweenOpensGlobalNatIso : |
| 147 | NestedLocalization.TopCat.Sheaf.sheafSectionsBetweenOpens X h ⋙ DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X ⊤ ≅ |
| 148 | DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X V ⋙ DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X U := |
| 149 | NatIso.ofComponents (sheafSectionsBetweenOpensGlobalIso X h) |
| 150 | (fun f => sheafSectionsBetweenOpensGlobalIso_naturality X h f) |
| 151 | |
| 152 | /-- Let `V ⊆ U` be open subsets of a topological space `X` and `K` an integer-indexed sheaf complex. |
| 153 | This identifies the last complex in the global sequence for supports `X \ U ⊆ X \ V` with |
| 154 | sections on `U` of `K` vanishing on `V`. In each degree both are the kernel of `K^q(U) → |
| 155 | K^q(V)`. -/ |
| 156 | def nestedSupportRestrictionLastComplexIso |
| 157 | (K : CochainComplex (Sheaf AddCommGrpCat.{u} X) ℤ) : |
| 158 | (NestedLocalization.TopCat.Sheaf.nestedSupportRestrictionSectionsComplexShortComplex X h ⊤ K).X₃ ≅ |
| 159 | ((DerivedSectionsLocalization.TopCat.Sheaf.supportEvaluation X U).mapHomologicalComplex ℤᵘᵖ).obj |
| 160 | (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X V).mapHomologicalComplex ℤᵘᵖ).obj K) := |
| 161 | (NatIso.mapHomologicalComplex (sheafSectionsBetweenOpensGlobalNatIso X h) ℤᵘᵖ).app K |
| 162 | |
| 163 | set_option backward.isDefEq.respectTransparency false in |
| 164 | set_option backward.defeqAttrib.useBackward true in |
| 165 | /-- The last localization map, under the kernel comparison, is |
| 166 | restriction of the supported section to `U`. -/ |
| 167 | @[reassoc] |
| 168 | theorem toSheafSectionsBetweenOpens_global_comparison |
| 169 | (F : Sheaf AddCommGrpCat.{u} X) : |
| 170 | ((NestedLocalization.TopCat.Sheaf.toSheafSectionsBetweenOpens X h).app F).hom.app (op ⊤) ≫ |
| 171 | (sheafSectionsBetweenOpensGlobalIso X h F).hom = |
| 172 | ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X V).obj F).obj.map (homOfLE (le_top : U ≤ ⊤)).op := by |
| 173 | have : Mono (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X V).app F).hom.app (op U)) := by |
| 174 | rw [← DerivedSectionsOn.TopCat.Sheaf.sheafSectionsSupportedOutsideOnOpenIso_hom_ι X V U F] |
| 175 | infer_instance |
| 176 | apply (cancel_mono (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X V).app F).hom.app (op U))).1 |
| 177 | rw [Category.assoc, sheafSectionsBetweenOpensGlobalIso_hom_inclusion] |
| 178 | have hι := ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X V).app F).hom.naturality |
| 179 | (homOfLE (le_top : U ≤ ⊤)).op |
| 180 | rw [hι, ← Category.assoc] |
| 181 | have hg : ((NestedLocalization.TopCat.Sheaf.toSheafSectionsBetweenOpens X h).app F).hom.app (op ⊤) ≫ |
| 182 | ((sheafSectionsBetweenOpensInclusion X h).app F).hom.app (op ⊤) = |
| 183 | ((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutsideInclusion X V).app F).hom.app (op ⊤) ≫ |
| 184 | ((DerivedSections.TopCat.Sheaf.toOpenRestrictionPushforward X U).app F).hom.app (op ⊤) := by |
| 185 | change (((NestedLocalization.TopCat.Sheaf.toSheafSectionsBetweenOpens X h).app F) ≫ |
| 186 | ((sheafSectionsBetweenOpensInclusion X h).app F)).hom.app (op ⊤) = _ |
| 187 | simp only [NestedLocalization.TopCat.Sheaf.toSheafSectionsBetweenOpens, sheafSectionsBetweenOpensInclusion, |
| 188 | kernel.map, kernel.lift_ι] |
| 189 | rfl |
| 190 | rw [hg, Category.assoc] |
| 191 | congr 1 |
| 192 | change F.obj.map _ ≫ F.obj.map _ = F.obj.map _ |
| 193 | rw [← F.obj.map_comp] |
| 194 | congr 1 |
| 195 | |
| 196 | /-- The last-complex identification retains the restriction map, |
| 197 | before passage to homology. -/ |
| 198 | @[reassoc] |
| 199 | theorem nestedSupportRestrictionLastComplexIso_g |
| 200 | (K : CochainComplex (Sheaf AddCommGrpCat.{u} X) ℤ) : |
| 201 | (NestedLocalization.TopCat.Sheaf.nestedSupportRestrictionSectionsComplexShortComplex X h ⊤ K).g ≫ |
| 202 | (nestedSupportRestrictionLastComplexIso X h K).hom = |
| 203 | SectionRestrictionCone.TopCat.Sheaf.sectionComplexRestriction X ℤᵘᵖ |
| 204 | (((DerivedSections.TopCat.Sheaf.sheafSectionsSupportedOutside X V).mapHomologicalComplex ℤᵘᵖ).obj K) |
| 205 | (homOfLE (le_top : U ≤ ⊤)) := by |
| 206 | ext n : 1 |
| 207 | exact toSheafSectionsBetweenOpens_global_comparison X h (K.X n) |
| 208 | |
| 209 | end |
| 210 | |
| 211 | end OAI.AlgebraicTopology.Support.NestedOnOpen.TopCat.Sheaf |