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.DerivedSectionsExact |
| 8 | import OAI.AlgebraicTopology.Support.SheafCohomology |
| 9 | import Mathlib.CategoryTheory.Sites.GlobalSections |
| 10 | import OAI.CategoryTheory.ConcreteCategory.Notation |
| 11 | |
| 12 | /-! # Open Restriction -/ |
| 13 | |
| 14 | namespace OAI.AlgebraicTopology.Sheaf.OpenRestriction.TopCat |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | open _root_.TopCat |
| 19 | open _root_.TopCat.Sheaf |
| 20 | |
| 21 | /-! |
| 22 | # Exact open restriction with its adjunction |
| 23 | |
| 24 | The naive open restriction is both a continuous-site direct image (hence |
| 25 | left exact) and isomorphic to topological inverse image (hence right exact). |
| 26 | Its adjunction to open direct image is displayed with the restriction |
| 27 | unit used to define sections with support. |
| 28 | -/ |
| 29 | |
| 30 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.TopologicalSpace Opposite |
| 31 | |
| 32 | universe u |
| 33 | |
| 34 | variable (X : TopCat.{u}) (U : Opens X) |
| 35 | |
| 36 | set_option backward.isDefEq.respectTransparency false in |
| 37 | instance openSheafRestriction_preservesFiniteLimits : |
| 38 | PreservesFiniteLimits (U.isOpenEmbedding.sheafPullback AddCommGrpCat.{u}) := by |
| 39 | constructor |
| 40 | intro J _ _ |
| 41 | let R := U.isOpenEmbedding.sheafPullback AddCommGrpCat.{u} |
| 42 | let T := sheafToPresheaf (Opens.grothendieckTopology (TopCat.of U)) AddCommGrpCat.{u} |
| 43 | let : PreservesLimitsOfShape J (R ⋙ T) := |
| 44 | inferInstanceAs (PreservesLimitsOfShape J |
| 45 | (sheafToPresheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u} ⋙ |
| 46 | (Functor.whiskeringLeft _ _ AddCommGrpCat.{u}).obj U.isOpenEmbedding.functor.op)) |
| 47 | let : T.Full := inferInstanceAs |
| 48 | (sheafToPresheaf (Opens.grothendieckTopology (TopCat.of U)) AddCommGrpCat.{u}).Full |
| 49 | let : T.Faithful := inferInstanceAs |
| 50 | (sheafToPresheaf (Opens.grothendieckTopology (TopCat.of U)) AddCommGrpCat.{u}).Faithful |
| 51 | exact preservesLimitsOfShape_of_reflects_of_preserves R T |
| 52 | |
| 53 | set_option backward.isDefEq.respectTransparency false in |
| 54 | instance openSheafRestriction_preservesFiniteColimits : |
| 55 | PreservesFiniteColimits (U.isOpenEmbedding.sheafPullback AddCommGrpCat.{u}) := |
| 56 | preservesFiniteColimits_of_natIso (U.isOpenEmbedding.sheafPullbackIso AddCommGrpCat.{u}) |
| 57 | |
| 58 | instance openSheafRestriction_additive : |
| 59 | (U.isOpenEmbedding.sheafPullback AddCommGrpCat.{u}).Additive where |
| 60 | map_add := by intros; rfl |
| 61 | |
| 62 | instance openSheafRestriction_isFlasque (F : Sheaf AddCommGrpCat.{u} X) [F.IsFlasque] : |
| 63 | ((U.isOpenEmbedding.sheafPullback AddCommGrpCat.{u}).obj F).IsFlasque where |
| 64 | epi i := by |
| 65 | change Epi (F.obj.map _) |
| 66 | infer_instance |
| 67 | |
| 68 | /-- Open restriction preserves quasi-isomorphisms of coefficient complexes. -/ |
| 69 | lemma openSheafRestriction_map_quasiIso |
| 70 | {K L : CochainComplex (Sheaf AddCommGrpCat.{u} X) ℤ} |
| 71 | (f : K ⟶ L) [QuasiIso f] : |
| 72 | QuasiIso (((U.isOpenEmbedding.sheafPullback AddCommGrpCat.{u}).mapHomologicalComplex |
| 73 | ℤᵘᵖ).map f) := inferInstance |
| 74 | |
| 75 | /-- Let `j: U → X` be the inclusion of an open subset of a topological space. For a sheaf `F` of |
| 76 | abelian groups on `U`, this natural map `(j_*F)|_U → F` identifies sections on an open of `U` |
| 77 | with sections on its image in `X`. It is the counit of restriction followed by direct image. -/ |
| 78 | def openSheafRestrictionCounit : |
| 79 | pushforward AddCommGrpCat.{u} U.inclusion' ⋙ |
| 80 | U.isOpenEmbedding.sheafPullback AddCommGrpCat.{u} ⟶ |
| 81 | 𝟭 (Sheaf AddCommGrpCat.{u} (TopCat.of U)) where |
| 82 | app F := ⟨{ |
| 83 | app V := F.obj.map (U.isOpenEmbedding.isOpenMap.adjunction.unit.app V.unop).op |
| 84 | naturality V W f := by |
| 85 | change F.obj.map _ ≫ F.obj.map _ = F.obj.map _ ≫ F.obj.map f |
| 86 | rw [← F.obj.map_comp, ← F.obj.map_comp] |
| 87 | congr 1 }⟩ |
| 88 | naturality F G f := by |
| 89 | apply CategoryTheory.Sheaf.hom_ext_iff.mpr |
| 90 | ext V : 2 |
| 91 | exact (f.hom.naturality _).symm |
| 92 | |
| 93 | set_option backward.defeqAttrib.useBackward true in |
| 94 | set_option backward.isDefEq.respectTransparency false in |
| 95 | /-- Let `j: U → X` be the inclusion of an open subset of a topological space. Restriction of |
| 96 | sheaves of abelian groups to `U` is left adjoint to direct image along `j`. This adjunction |
| 97 | identifies morphisms `F|_U → G` with morphisms `F → j_*G`; its unit sends sections of `F` to |
| 98 | their restrictions to `U`. -/ |
| 99 | def openSheafRestrictionAdjunction : |
| 100 | U.isOpenEmbedding.sheafPullback AddCommGrpCat.{u} ⊣ |
| 101 | pushforward AddCommGrpCat.{u} U.inclusion' := |
| 102 | Adjunction.mkOfUnitCounit |
| 103 | { unit := Support.DerivedSections.TopCat.Sheaf.toOpenRestrictionPushforward X U |
| 104 | counit := openSheafRestrictionCounit X U |
| 105 | left_triangle := by |
| 106 | ext F : 2 |
| 107 | apply CategoryTheory.Sheaf.hom_ext_iff.mpr |
| 108 | ext V : 2 |
| 109 | change F.obj.map _ ≫ F.obj.map _ = 𝟙 _ |
| 110 | rw [← F.obj.map_comp] |
| 111 | convert F.obj.map_id _ using 1 |
| 112 | right_triangle := by |
| 113 | ext F : 2 |
| 114 | apply CategoryTheory.Sheaf.hom_ext_iff.mpr |
| 115 | ext V : 2 |
| 116 | change F.obj.map _ ≫ F.obj.map _ = 𝟙 _ |
| 117 | rw [← F.obj.map_comp] |
| 118 | convert F.obj.map_id _ using 1 } |
| 119 | |
| 120 | /-- Constant sections on an open subspace map to the restriction of the ambient |
| 121 | constant sheaf, by the sheafification unit itself. -/ |
| 122 | def constantToOpenSheafRestriction (A : AddCommGrpCat.{u}) : |
| 123 | 𝓒[↧U; A] ⟶ |
| 124 | (U.isOpenEmbedding.sheafPullback AddCommGrpCat).obj 𝓒[X; A] := |
| 125 | ⟨sheafifyLift (Opens.grothendieckTopology (TopCat.of U)) |
| 126 | (Functor.whiskerLeft U.isOpenEmbedding.functor.op |
| 127 | (toSheafify (Opens.grothendieckTopology X) 𝓒ᵖ[X; A])) |
| 128 | ((U.isOpenEmbedding.sheafPullback AddCommGrpCat).obj |
| 129 | 𝓒[X; A]).property⟩ |
| 130 | |
| 131 | @[reassoc] |
| 132 | lemma toSheafify_constantToOpenSheafRestriction (A : AddCommGrpCat.{u}) : |
| 133 | toSheafify (Opens.grothendieckTopology (TopCat.of U)) 𝓒ᵖ[↧U; A] ≫ |
| 134 | (constantToOpenSheafRestriction X U A).hom = |
| 135 | Functor.whiskerLeft U.isOpenEmbedding.functor.op |
| 136 | (toSheafify (Opens.grothendieckTopology X) 𝓒ᵖ[X; A]) := |
| 137 | toSheafify_sheafifyLift _ _ _ |
| 138 | |
| 139 | set_option backward.defeqAttrib.useBackward true in |
| 140 | set_option backward.isDefEq.respectTransparency false in |
| 141 | /-- Restriction of ambient constants, followed by the constant/open |
| 142 | comparison, is the support-defining restriction unit. -/ |
| 143 | @[reassoc] |
| 144 | lemma constantRestriction_pushforward_constantToOpen (A : AddCommGrpCat.{u}) : |
| 145 | Support.SheafCohomology.TopCat.Sheaf.constantRestriction U.inclusion' A ≫ |
| 146 | (pushforward AddCommGrpCat U.inclusion').map |
| 147 | (constantToOpenSheafRestriction X U A) = |
| 148 | (Support.DerivedSections.TopCat.Sheaf.toOpenRestrictionPushforward X U).app |
| 149 | 𝓒[X; A] := by |
| 150 | apply CategoryTheory.Sheaf.hom_ext_iff.mpr |
| 151 | apply sheafify_hom_ext |
| 152 | · exact ((Support.DerivedSections.TopCat.Sheaf.openRestrictionPushforward X U).obj 𝓒[X; A]).property |
| 153 | rw [ObjectProperty.FullSubcategory.comp_hom, ← Category.assoc, |
| 154 | Support.SheafCohomology.TopCat.Sheaf.toSheafify_constantRestriction] |
| 155 | ext V : 2 |
| 156 | change (toSheafify (Opens.grothendieckTopology (TopCat.of U)) 𝓒ᵖ[↧U; A]).app _ ≫ |
| 157 | (constantToOpenSheafRestriction X U A).hom.app _ = _ |
| 158 | rw [← NatTrans.comp_app, toSheafify_constantToOpenSheafRestriction] |
| 159 | simpa [Support.DerivedSections.TopCat.Sheaf.toOpenRestrictionPushforward, Topology.IsOpenEmbedding.sheafPullback, |
| 160 | Functor.sheafPushforwardContinuous, constantSheaf, Constant.TopCat.const, |
| 161 | Constant.TopCat.constantFunctor] using |
| 162 | ((toSheafify (Opens.grothendieckTopology X) 𝓒ᵖ[X; A]).naturality |
| 163 | (U.isOpenEmbedding.isOpenMap.adjunction.counit.app V.unop).op) |
| 164 | |
| 165 | /-- Let `U` be open in a topological space `X` and `A` an abelian group. This map from the |
| 166 | restriction of the constant sheaf `A_X` to the constant sheaf `A_U` is adjoint to `A_X → |
| 167 | j_*A_U`, where `j: U → X` is inclusion. It preserves constant sections. -/ |
| 168 | def openSheafRestrictionToConstant (A : AddCommGrpCat.{u}) : |
| 169 | (U.isOpenEmbedding.sheafPullback AddCommGrpCat).obj |
| 170 | 𝓒[X; A] ⟶ 𝓒[↧U; A] := |
| 171 | ((openSheafRestrictionAdjunction X U).homEquiv _ _).symm |
| 172 | (Support.SheafCohomology.TopCat.Sheaf.constantRestriction U.inclusion' A) |
| 173 | |
| 174 | set_option backward.defeqAttrib.useBackward true in |
| 175 | set_option backward.isDefEq.respectTransparency false in |
| 176 | @[reassoc (attr := simp)] |
| 177 | lemma openSheafRestrictionToConstant_constantToOpen (A : AddCommGrpCat.{u}) : |
| 178 | openSheafRestrictionToConstant X U A ≫ constantToOpenSheafRestriction X U A = 𝟙 _ := by |
| 179 | apply ((openSheafRestrictionAdjunction X U).homEquiv _ _).injective |
| 180 | rw [Adjunction.homEquiv_naturality_right, openSheafRestrictionToConstant, |
| 181 | Equiv.apply_symm_apply, Adjunction.homEquiv_id] |
| 182 | exact constantRestriction_pushforward_constantToOpen X U A |
| 183 | |
| 184 | set_option backward.defeqAttrib.useBackward true in |
| 185 | set_option backward.isDefEq.respectTransparency false in |
| 186 | @[reassoc (attr := simp)] |
| 187 | lemma constantToOpen_openSheafRestrictionToConstant (A : AddCommGrpCat.{u}) : |
| 188 | constantToOpenSheafRestriction X U A ≫ openSheafRestrictionToConstant X U A = 𝟙 _ := by |
| 189 | apply CategoryTheory.Sheaf.hom_ext_iff.mpr |
| 190 | apply sheafify_hom_ext |
| 191 | · exact 𝓒[↧U; A].property |
| 192 | rw [ObjectProperty.FullSubcategory.comp_hom, ← Category.assoc, |
| 193 | toSheafify_constantToOpenSheafRestriction] |
| 194 | ext V : 2 |
| 195 | change _ ≫ (((U.isOpenEmbedding.sheafPullback AddCommGrpCat).map |
| 196 | (Support.SheafCohomology.TopCat.Sheaf.constantRestriction U.inclusion' A)).hom.app V ≫ |
| 197 | ((openSheafRestrictionCounit X U).app _).hom.app V) = _ |
| 198 | change (toSheafify (Opens.grothendieckTopology X) 𝓒ᵖ[X; A] ≫ |
| 199 | (Support.SheafCohomology.TopCat.Sheaf.constantRestriction U.inclusion' A).hom).app _ ≫ _ = _ |
| 200 | rw [Support.SheafCohomology.TopCat.Sheaf.toSheafify_constantRestriction] |
| 201 | exact ((toSheafify (Opens.grothendieckTopology (TopCat.of U)) 𝓒ᵖ[↧U; A]).naturality |
| 202 | (U.isOpenEmbedding.isOpenMap.adjunction.unit.app V.unop).op).symm |
| 203 | |
| 204 | /-- Constant sheaves commute with open restriction through the explicitly |
| 205 | normalized maps induced by constant sections. -/ |
| 206 | def constantOpenSheafRestrictionIso (A : AddCommGrpCat.{u}) : |
| 207 | 𝓒[↧U; A] ≅ |
| 208 | (U.isOpenEmbedding.sheafPullback AddCommGrpCat).obj 𝓒[X; A] where |
| 209 | hom := constantToOpenSheafRestriction X U A |
| 210 | inv := openSheafRestrictionToConstant X U A |
| 211 | hom_inv_id := constantToOpen_openSheafRestrictionToConstant X U A |
| 212 | inv_hom_id := openSheafRestrictionToConstant_constantToOpen X U A |
| 213 | |
| 214 | end |
| 215 | |
| 216 | end OAI.AlgebraicTopology.Sheaf.OpenRestriction.TopCat |