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 | import Mathlib.AlgebraicGeometry.Modules.Sheaf |
| 2 | import Mathlib.Algebra.Module.TransferInstance |
| 3 | import Mathlib.CategoryTheory.Abelian.GrothendieckCategory.HasExt |
| 4 | import Mathlib.CategoryTheory.Sites.SheafCohomology.Basic |
| 5 | import Mathlib.Topology.Sheaves.Abelian |
| 6 | |
| 7 | /-! # Affine H -/ |
| 8 | |
| 9 | namespace OAI.AlgebraicGeometry.SheafCohomology.AffineH.Projective |
| 10 | |
| 11 | noncomputable section |
| 12 | |
| 13 | /-! |
| 14 | # Global scalar actions and degree-zero cohomology of scheme modules |
| 15 | |
| 16 | This file connects Mathlib's actual category of modules on a scheme to its |
| 17 | Ext-based sheaf cohomology. The underlying abelian sheaf is supplied by the |
| 18 | existing functor `SheafOfModules.toSheaf`; no parallel sheaf or cohomology |
| 19 | notion is introduced. |
| 20 | |
| 21 | For a module `M` on a scheme `X`, `zariskiFunctor X n` evaluates |
| 22 | `CategoryTheory.Sheaf.functorH` on the Zariski opens site. In degree zero, |
| 23 | Mathlib's `CategoryTheory.Sheaf.H.equiv₀` identifies this group with the |
| 24 | genuine sections `Γ(M, ⊤)`. We record its naturality for an actual module |
| 25 | morphism. The separate `SchemeModuleCohomologyAffine` module consumes this |
| 26 | interface for affine tilde modules. |
| 27 | |
| 28 | Mathlib's cohomology functor uses the underlying abelian sheaf, so it does not |
| 29 | directly retain the action of `Γ(X, ⊤)`. Multiplication by a global function |
| 30 | is nevertheless an actual endomorphism of every scheme module. Applying the |
| 31 | cohomology functor to these endomorphisms gives a canonical global-functions |
| 32 | action in every degree, independent of a cover or resolution. The actions are |
| 33 | named definitions rather than global instances, so clients opt into them |
| 34 | without changing scalar inference for arbitrary `Ext` groups. |
| 35 | |
| 36 | Nothing here asserts coherence, finite-dimensionality, affine acyclicity, or |
| 37 | vanishing in positive degree. |
| 38 | -/ |
| 39 | |
| 40 | universe u |
| 41 | |
| 42 | open _root_.CategoryTheory _root_.TopologicalSpace |
| 43 | open _root_.AlgebraicGeometry |
| 44 | open scoped _root_.AlgebraicGeometry |
| 45 | |
| 46 | /-- Ext-based cohomology of the underlying abelian sheaf of a scheme module, |
| 47 | on the Zariski site of opens. -/ |
| 48 | noncomputable def zariskiFunctor (X : Scheme.{u}) (n : ℕ) : |
| 49 | CategoryTheory.Functor X.Modules AddCommGrpCat.{u} := |
| 50 | SheafOfModules.toSheaf X.ringCatSheaf ⋙ |
| 51 | CategoryTheory.Sheaf.functorH (Opens.grothendieckTopology X) n |
| 52 | |
| 53 | noncomputable instance (X : Scheme.{u}) (n : ℕ) : |
| 54 | (zariskiFunctor X n).Additive := by |
| 55 | let F := SheafOfModules.toSheaf X.ringCatSheaf |
| 56 | let G := CategoryTheory.Sheaf.functorH |
| 57 | (Opens.grothendieckTopology X) n |
| 58 | change (F ⋙ G).Additive |
| 59 | constructor |
| 60 | intro M N f g |
| 61 | change G.map (F.map (f + g)) = G.map (F.map f) + G.map (F.map g) |
| 62 | rw [F.map_add, G.map_add] |
| 63 | |
| 64 | /-- The degree-`n` Zariski sheaf cohomology group of a module on a scheme. -/ |
| 65 | abbrev H {X : Scheme.{u}} (M : X.Modules) (n : ℕ) : Type u := |
| 66 | (zariskiFunctor X n).obj M |
| 67 | |
| 68 | private def restrictGlobal {X : Scheme.{u}} (r : Γ(X, ⊤)) |
| 69 | (U : (Opens X)ᵒᵖ) : X.ringCatSheaf.obj.obj U := |
| 70 | X.presheaf.map |
| 71 | (homOfLE (show U.unop ≤ ⊤ from le_top)).op r |
| 72 | |
| 73 | private def globalSmulLinearMap {X : Scheme.{u}} (M : X.Modules) |
| 74 | (U : (Opens X)ᵒᵖ) (r : Γ(X, ⊤)) : M.val.obj U ⟶ M.val.obj U := |
| 75 | ModuleCat.ofHom |
| 76 | { toFun := fun x ↦ restrictGlobal r U • x |
| 77 | map_add' := fun x y ↦ smul_add _ x y |
| 78 | map_smul' := fun a x ↦ by |
| 79 | let : CommRing (X.ringCatSheaf.obj.obj U) := |
| 80 | inferInstanceAs (CommRing (X.presheaf.obj U)) |
| 81 | simpa only [RingHom.id_apply, smul_smul] using |
| 82 | congrArg (fun b : X.ringCatSheaf.obj.obj U ↦ b • x) |
| 83 | (mul_comm (restrictGlobal r U) a) } |
| 84 | |
| 85 | /-- Multiplication by a global function, as an actual endomorphism of a |
| 86 | scheme module. On every open it is multiplication by the restriction of the |
| 87 | global function. -/ |
| 88 | def globalSmulHom {X : Scheme.{u}} (M : X.Modules) (r : Γ(X, ⊤)) : M ⟶ M where |
| 89 | val := |
| 90 | { app := fun U ↦ globalSmulLinearMap M U r |
| 91 | naturality := by |
| 92 | intro U V i |
| 93 | ext x |
| 94 | change restrictGlobal r V • M.val.map i x = |
| 95 | M.val.map i (restrictGlobal r U • x) |
| 96 | rw [M.val.map_smul] |
| 97 | congr 1 |
| 98 | unfold restrictGlobal |
| 99 | change X.presheaf.map _ r = |
| 100 | X.presheaf.map i (X.presheaf.map _ r) |
| 101 | rw [← ConcreteCategory.comp_apply, ← X.presheaf.map_comp] |
| 102 | apply ConcreteCategory.congr_hom |
| 103 | exact X.presheaf.congr_map (Subsingleton.elim _ _) } |
| 104 | |
| 105 | private theorem globalSmulHom_zero {X : Scheme.{u}} (M : X.Modules) : |
| 106 | globalSmulHom M 0 = 0 := by |
| 107 | apply SheafOfModules.hom_ext |
| 108 | apply PresheafOfModules.hom_ext |
| 109 | intro U |
| 110 | ext x |
| 111 | change restrictGlobal 0 U • x = 0 |
| 112 | rw [restrictGlobal, map_zero] |
| 113 | exact (M.val.obj U).isModule.zero_smul x |
| 114 | |
| 115 | private theorem globalSmulHom_one {X : Scheme.{u}} (M : X.Modules) : |
| 116 | globalSmulHom M 1 = 𝟙 M := by |
| 117 | apply SheafOfModules.hom_ext |
| 118 | apply PresheafOfModules.hom_ext |
| 119 | intro U |
| 120 | ext x |
| 121 | change restrictGlobal 1 U • x = x |
| 122 | rw [restrictGlobal, map_one] |
| 123 | exact (M.val.obj U).isModule.one_smul x |
| 124 | |
| 125 | private theorem globalSmulHom_add {X : Scheme.{u}} (M : X.Modules) |
| 126 | (r s : Γ(X, ⊤)) : |
| 127 | globalSmulHom M (r + s) = globalSmulHom M r + globalSmulHom M s := by |
| 128 | apply SheafOfModules.hom_ext |
| 129 | apply PresheafOfModules.hom_ext |
| 130 | intro U |
| 131 | ext x |
| 132 | change restrictGlobal (r + s) U • x = |
| 133 | restrictGlobal r U • x + restrictGlobal s U • x |
| 134 | rw [restrictGlobal, map_add] |
| 135 | exact (M.val.obj U).isModule.add_smul _ _ x |
| 136 | |
| 137 | private theorem globalSmulHom_mul {X : Scheme.{u}} (M : X.Modules) |
| 138 | (r s : Γ(X, ⊤)) : |
| 139 | globalSmulHom M (r * s) = globalSmulHom M s ≫ globalSmulHom M r := by |
| 140 | apply SheafOfModules.hom_ext |
| 141 | apply PresheafOfModules.hom_ext |
| 142 | intro U |
| 143 | ext x |
| 144 | change restrictGlobal (r * s) U • x = |
| 145 | restrictGlobal r U • (restrictGlobal s U • x) |
| 146 | rw [restrictGlobal, map_mul] |
| 147 | exact (M.val.obj U).isModule.mul_smul _ _ x |
| 148 | |
| 149 | /-- Global functions act on a scheme module by their actual sectionwise multiplication. -/ |
| 150 | def globalSmulEndRingHom {X : Scheme.{u}} (M : X.Modules) : |
| 151 | Γ(X, ⊤) →+* End M where |
| 152 | toFun := globalSmulHom M |
| 153 | map_zero' := globalSmulHom_zero M |
| 154 | map_one' := globalSmulHom_one M |
| 155 | map_add' := globalSmulHom_add M |
| 156 | map_mul' := globalSmulHom_mul M |
| 157 | |
| 158 | /-- The canonical action of global functions on genuine Ext-based sheaf |
| 159 | cohomology. A scalar acts by applying cohomology to the corresponding |
| 160 | endomorphism of the coefficient module. -/ |
| 161 | noncomputable def globalSectionsCohomologyAction {X : Scheme.{u}} |
| 162 | (M : X.Modules) (n : ℕ) : Γ(X, ⊤) →+* End ((zariskiFunctor X n).obj M) where |
| 163 | toFun r := (zariskiFunctor X n).map (globalSmulHom M r) |
| 164 | map_zero' := by rw [globalSmulHom_zero, Functor.map_zero] |
| 165 | map_one' := by |
| 166 | rw [globalSmulHom_one] |
| 167 | simpa only [CategoryTheory.End.one_def] using |
| 168 | (zariskiFunctor X n).map_id M |
| 169 | map_add' r s := by rw [globalSmulHom_add, Functor.map_add] |
| 170 | map_mul' r s := by |
| 171 | rw [globalSmulHom_mul] |
| 172 | simpa only [CategoryTheory.End.mul_def] using |
| 173 | (zariskiFunctor X n).map_comp |
| 174 | (globalSmulHom M s) (globalSmulHom M r) |
| 175 | |
| 176 | /-- The canonical `Γ(X, ⊤)`-module structure on genuine sheaf cohomology |
| 177 | in every degree. Unlike the older Cech-transported action, this definition |
| 178 | does not depend on an affine cover. -/ |
| 179 | @[reducible] |
| 180 | noncomputable def globalSectionsCohomologyModule {X : Scheme.{u}} |
| 181 | (M : X.Modules) (n : ℕ) : Module Γ(X, ⊤) (Projective.H M n) := by |
| 182 | change Module Γ(X, ⊤) |
| 183 | (ModuleCat.mkOfSMul' (globalSectionsCohomologyAction M n)) |
| 184 | infer_instance |
| 185 | |
| 186 | /-- The canonical cohomology action evaluates to the cohomology map induced |
| 187 | by multiplication on the coefficient module. -/ |
| 188 | theorem globalSectionsCohomologyModule_smul {X : Scheme.{u}} |
| 189 | (M : X.Modules) (n : ℕ) (r : Γ(X, ⊤)) (x : Projective.H M n) : |
| 190 | letI := globalSectionsCohomologyModule M n |
| 191 | r • x = (zariskiFunctor X n).map (globalSmulHom M r) x := by |
| 192 | rfl |
| 193 | |
| 194 | /-- Multiplication by a global function commutes with every morphism of |
| 195 | scheme modules. -/ |
| 196 | theorem globalSmulHom_naturality {X : Scheme.{u}} {M N : X.Modules} |
| 197 | (f : M ⟶ N) (r : Γ(X, ⊤)) : |
| 198 | globalSmulHom M r ≫ f = f ≫ globalSmulHom N r := by |
| 199 | apply SheafOfModules.hom_ext |
| 200 | apply PresheafOfModules.hom_ext |
| 201 | intro U |
| 202 | ext x |
| 203 | change f.val.app U (restrictGlobal r U • x) = |
| 204 | restrictGlobal r U • f.val.app U x |
| 205 | exact (f.val.app U).hom.map_smul (restrictGlobal r U) x |
| 206 | |
| 207 | /-- Cohomology maps induced by actual morphisms of scheme modules are linear |
| 208 | for the canonical global-functions actions. -/ |
| 209 | noncomputable def cohomologyLinearMap {X : Scheme.{u}} {M N : X.Modules} |
| 210 | (n : ℕ) (f : M ⟶ N) : |
| 211 | letI := globalSectionsCohomologyModule M n |
| 212 | letI := globalSectionsCohomologyModule N n |
| 213 | Projective.H M n →ₗ[Γ(X, ⊤)] Projective.H N n := by |
| 214 | letI := globalSectionsCohomologyModule M n |
| 215 | letI := globalSectionsCohomologyModule N n |
| 216 | refine |
| 217 | { toFun := (zariskiFunctor X n).map f |
| 218 | map_add' := ((zariskiFunctor X n).map f).hom.map_add |
| 219 | map_smul' := ?_ } |
| 220 | intro r x |
| 221 | change (zariskiFunctor X n).map f |
| 222 | ((zariskiFunctor X n).map (globalSmulHom M r) x) = |
| 223 | (zariskiFunctor X n).map (globalSmulHom N r) |
| 224 | ((zariskiFunctor X n).map f x) |
| 225 | rw [← ConcreteCategory.comp_apply, ← Functor.map_comp, |
| 226 | globalSmulHom_naturality, Functor.map_comp, |
| 227 | ConcreteCategory.comp_apply] |
| 228 | |
| 229 | /-- Degree-zero cohomology is the actual group of global sections at the top |
| 230 | open of the scheme. -/ |
| 231 | noncomputable def hZeroEquivGlobalSections {X : Scheme.{u}} |
| 232 | (M : X.Modules) : Projective.H M 0 ≃+ Γ(M, ⊤) := |
| 233 | CategoryTheory.Sheaf.H.equiv₀ |
| 234 | ((SheafOfModules.toSheaf X.ringCatSheaf).obj M) |
| 235 | (Limits.isTerminalTop : Limits.IsTerminal (⊤ : Opens X)) |
| 236 | |
| 237 | /-- The degree-zero/global-sections equivalence commutes with an actual |
| 238 | morphism of scheme modules. -/ |
| 239 | theorem hZeroEquivGlobalSections_naturality {X : Scheme.{u}} |
| 240 | {M N : X.Modules} (f : M ⟶ N) (x : Projective.H M 0) : |
| 241 | f.app ⊤ (hZeroEquivGlobalSections M x) = |
| 242 | hZeroEquivGlobalSections N ((zariskiFunctor X 0).map f x) := |
| 243 | CategoryTheory.Sheaf.H.equiv₀_naturality |
| 244 | (Limits.isTerminalTop : Limits.IsTerminal (⊤ : Opens X)) |
| 245 | ((SheafOfModules.toSheaf X.ringCatSheaf).map f) x |
| 246 | |
| 247 | private theorem globalSmulHom_app_top {X : Scheme.{u}} (M : X.Modules) |
| 248 | (r : Γ(X, ⊤)) (x : Γ(M, ⊤)) : |
| 249 | (globalSmulHom M r).app ⊤ x = r • x := by |
| 250 | have hr : restrictGlobal r (.op (⊤ : Opens X)) = r := by |
| 251 | unfold restrictGlobal |
| 252 | rw [show (homOfLE (show (⊤ : Opens X) ≤ ⊤ from le_rfl)).op = 𝟙 _ by |
| 253 | apply Subsingleton.elim, X.presheaf.map_id] |
| 254 | rfl |
| 255 | change (globalSmulLinearMap M (.op (⊤ : Opens X)) r).hom x = r • x |
| 256 | exact congrArg (fun s : Γ(X, ⊤) ↦ s • x) hr |
| 257 | |
| 258 | /-- For the canonical cohomology action in degree zero, the comparison with |
| 259 | global sections is linear over the ring of global functions. -/ |
| 260 | noncomputable def hZeroCanonicalLinearEquivGlobalSections |
| 261 | {X : Scheme.{u}} (M : X.Modules) : |
| 262 | letI := globalSectionsCohomologyModule M 0 |
| 263 | Projective.H M 0 ≃ₗ[Γ(X, ⊤)] Γ(M, ⊤) := by |
| 264 | letI := globalSectionsCohomologyModule M 0 |
| 265 | refine |
| 266 | { hZeroEquivGlobalSections M with |
| 267 | map_smul' := ?_ } |
| 268 | intro r x |
| 269 | rw [globalSectionsCohomologyModule_smul] |
| 270 | calc |
| 271 | hZeroEquivGlobalSections M |
| 272 | ((zariskiFunctor X 0).map (globalSmulHom M r) x) = |
| 273 | (globalSmulHom M r).app ⊤ (hZeroEquivGlobalSections M x) := |
| 274 | (hZeroEquivGlobalSections_naturality (globalSmulHom M r) x).symm |
| 275 | _ = r • hZeroEquivGlobalSections M x := |
| 276 | globalSmulHom_app_top M r (hZeroEquivGlobalSections M x) |
| 277 | |
| 278 | /-- The `Γ(X, ⊤)`-module structure on degree-zero cohomology transported |
| 279 | from genuine global sections. It is named, not registered globally, because |
| 280 | the underlying Ext group also carries native scalar structures coming from |
| 281 | linearity of its ambient abelian-sheaf category. -/ |
| 282 | @[reducible] |
| 283 | noncomputable def hZeroModule {X : Scheme.{u}} (M : X.Modules) : |
| 284 | Module Γ(X, ⊤) (Projective.H M 0) := |
| 285 | (hZeroEquivGlobalSections M).module Γ(X, ⊤) |
| 286 | |
| 287 | /-- The transported and canonical global-functions actions on degree-zero |
| 288 | cohomology are the same module structure. -/ |
| 289 | theorem hZeroModule_eq_globalSectionsCohomologyModule {X : Scheme.{u}} |
| 290 | (M : X.Modules) : |
| 291 | hZeroModule M = globalSectionsCohomologyModule M 0 := by |
| 292 | apply Module.ext' |
| 293 | intro r x |
| 294 | change (hZeroEquivGlobalSections M).symm |
| 295 | (r • hZeroEquivGlobalSections M x) = |
| 296 | (@globalSectionsCohomologyModule X M 0).toSMul.smul r x |
| 297 | apply (hZeroEquivGlobalSections M).injective |
| 298 | rw [(hZeroEquivGlobalSections M).apply_symm_apply] |
| 299 | exact (hZeroCanonicalLinearEquivGlobalSections M).map_smul r x |>.symm |
| 300 | |
| 301 | /-- With the explicit transported action, the degree-zero/global-sections |
| 302 | comparison is linear over the ring of global functions. -/ |
| 303 | noncomputable def hZeroLinearEquivGlobalSections {X : Scheme.{u}} |
| 304 | (M : X.Modules) : |
| 305 | letI := hZeroModule M |
| 306 | Projective.H M 0 ≃ₗ[Γ(X, ⊤)] Γ(M, ⊤) := |
| 307 | letI := hZeroModule M |
| 308 | (hZeroEquivGlobalSections M).linearEquiv Γ(X, ⊤) |
| 309 | |
| 310 | /-- A morphism of scheme modules acts linearly on global sections. This is |
| 311 | the target-side map in the linear naturality square for degree-zero |
| 312 | cohomology. -/ |
| 313 | def globalSectionsLinearMap {X : Scheme.{u}} {M N : X.Modules} |
| 314 | (f : M ⟶ N) : Γ(M, ⊤) →ₗ[Γ(X, ⊤)] Γ(N, ⊤) := |
| 315 | (f.val.app (.op (⊤ : Opens X))).hom |
| 316 | |
| 317 | /-- The actual degree-zero cohomology map, bundled linearly using the |
| 318 | transported global-functions actions. -/ |
| 319 | noncomputable def hZeroLinearMap {X : Scheme.{u}} {M N : X.Modules} |
| 320 | (f : M ⟶ N) : |
| 321 | letI := hZeroModule M |
| 322 | letI := hZeroModule N |
| 323 | Projective.H M 0 →ₗ[Γ(X, ⊤)] Projective.H N 0 := by |
| 324 | letI := hZeroModule M |
| 325 | letI := hZeroModule N |
| 326 | exact (hZeroLinearEquivGlobalSections N).symm.toLinearMap.comp |
| 327 | ((globalSectionsLinearMap f).comp |
| 328 | (hZeroLinearEquivGlobalSections M).toLinearMap) |
| 329 | |
| 330 | /-- The bundled linear map has the same underlying function as Mathlib's |
| 331 | Ext-based degree-zero cohomology functor. -/ |
| 332 | theorem hZeroLinearMap_apply {X : Scheme.{u}} {M N : X.Modules} |
| 333 | (f : M ⟶ N) (x : Projective.H M 0) : |
| 334 | letI := hZeroModule M |
| 335 | letI := hZeroModule N |
| 336 | hZeroLinearMap f x = (zariskiFunctor X 0).map f x := by |
| 337 | let := hZeroModule M |
| 338 | let := hZeroModule N |
| 339 | simp only [hZeroLinearMap, LinearMap.comp_apply] |
| 340 | apply (hZeroLinearEquivGlobalSections N).toEquiv.symm_apply_eq.mpr |
| 341 | change f.app ⊤ (hZeroEquivGlobalSections M x) = |
| 342 | hZeroEquivGlobalSections N ((zariskiFunctor X 0).map f x) |
| 343 | exact hZeroEquivGlobalSections_naturality f x |
| 344 | |
| 345 | /-- The degree-zero/global-sections linear equivalence is natural for actual |
| 346 | morphisms of scheme modules. -/ |
| 347 | theorem hZeroLinearEquivGlobalSections_naturality {X : Scheme.{u}} |
| 348 | {M N : X.Modules} (f : M ⟶ N) (x : Projective.H M 0) : |
| 349 | letI := hZeroModule M |
| 350 | letI := hZeroModule N |
| 351 | globalSectionsLinearMap f (hZeroLinearEquivGlobalSections M x) = |
| 352 | hZeroLinearEquivGlobalSections N (hZeroLinearMap f x) := by |
| 353 | rw [hZeroLinearMap_apply] |
| 354 | exact hZeroEquivGlobalSections_naturality f x |
| 355 | |
| 356 | end |
| 357 | |
| 358 | end OAI.AlgebraicGeometry.SheafCohomology.AffineH.Projective |