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.CategoryTheory.Sites.SheafCohomologyPair |
| 18 | import Mathlib.Topology.Sheaves.Abelian |
| 19 | import Mathlib.Topology.Sets.Closeds |
| 20 | |
| 21 | /-! # Cohomology -/ |
| 22 | |
| 23 | namespace OAI.AlgebraicTopology.Support.Cohomology.TopCat.Sheaf |
| 24 | |
| 25 | noncomputable section |
| 26 | |
| 27 | open _root_.TopCat |
| 28 | |
| 29 | /-! |
| 30 | # Sheaf cohomology with support in a closed set |
| 31 | |
| 32 | For a closed subset `Z` of a topological space `X`, `H^n_Z(X; F)` is the cohomology of the pair |
| 33 | `(X, X \ Z)` with coefficients in the abelian sheaf `F`, that is `Ext (ℤ[X, X \ Z]) F n`. |
| 34 | Forgetting the support is the map `H^n_Z(X; F) → H^n(X; F)` of the long exact sequence of the |
| 35 | pair. |
| 36 | -/ |
| 37 | |
| 38 | open _root_.CategoryTheory Limits Abelian Opposite _root_.TopologicalSpace |
| 39 | |
| 40 | open _root_.TopCat.Sheaf |
| 41 | |
| 42 | universe w u |
| 43 | |
| 44 | variable (X : TopCat.{u}) |
| 45 | |
| 46 | instance {U V : Opens X} (f : U ⟶ V) : Mono f := ⟨fun _ _ _ => Subsingleton.elim _ _⟩ |
| 47 | |
| 48 | variable [HasExt.{w} (CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u})] |
| 49 | |
| 50 | /-- `H^n_Z(X; F)`, the sheaf cohomology of `X` with support in the closed set `Z` and coefficients |
| 51 | in `F`: the cohomology of the pair `(X, X \ Z)`. -/ |
| 52 | abbrev supportH (Z : Closeds X) |
| 53 | (F : CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}) (n : ℕ) : Type w := |
| 54 | OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.relH F n (homOfLE (le_top : Z.compl ≤ ⊤)) |
| 55 | |
| 56 | @[inherit_doc supportH] |
| 57 | scoped notation:max "H_[" Z "]^" n:max "(" X "; " F ")" => OAI.AlgebraicTopology.Support.Cohomology.TopCat.Sheaf.supportH X Z F n |
| 58 | |
| 59 | omit [HasExt.{w} (CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u})] in |
| 60 | /-- `ℤ[U] = 0` for the empty open `U`: every sheaf has only the zero section on `U`. -/ |
| 61 | lemma isZero_freeAbelianSheaf_of_eq_bot (U : Opens X) (hU : U = ⊥) : |
| 62 | IsZero ((OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.freeAbelianSheaf (Opens.grothendieckTopology X)).obj U) := by |
| 63 | subst hU |
| 64 | rw [IsZero.iff_id_eq_zero] |
| 65 | apply (OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.freeAbelianSheafHomAddEquiv ⊥ _).injective |
| 66 | have : Subsingleton |
| 67 | (((OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.freeAbelianSheaf (Opens.grothendieckTopology X)).obj ⊥).obj.obj |
| 68 | (op ⊥)) := |
| 69 | AddCommGrpCat.subsingleton_of_isZero (IsZero.of_iso (isZero_zero _) |
| 70 | (HasZeroObject.zeroIsoIsTerminal (CategoryTheory.Sheaf.isTerminalOfBotCover |
| 71 | ((OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.freeAbelianSheaf (Opens.grothendieckTopology X)).obj ⊥) |
| 72 | ⊥ (fun _ h => h.elim))).symm) |
| 73 | exact Subsingleton.elim _ _ |
| 74 | |
| 75 | /-- For `W = ⊥`, the map `ℤ[V] ⟶ ℤ[V, W]` is an isomorphism. -/ |
| 76 | instance {W V : Opens X} (f : W ⟶ V) [Fact (W = ⊥)] : |
| 77 | IsIso (cokernel.π ((OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.freeAbelianSheaf (Opens.grothendieckTopology X)).map f)) := by |
| 78 | have hf : (OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.freeAbelianSheaf (Opens.grothendieckTopology X)).map f = 0 := |
| 79 | (isZero_freeAbelianSheaf_of_eq_bot X W Fact.out).eq_of_src _ _ |
| 80 | have : cokernel.π ((OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.freeAbelianSheaf (Opens.grothendieckTopology X)).map f) = |
| 81 | cokernel.π (0 : _ ⟶ _) ≫ (cokernelIsoOfEq hf).inv := by |
| 82 | rw [← π_comp_cokernelIsoOfEq_hom hf, Category.assoc, Iso.hom_inv_id, Category.comp_id] |
| 83 | rw [this] |
| 84 | infer_instance |
| 85 | |
| 86 | /-- Forgetting the support `X` itself loses nothing. -/ |
| 87 | lemma relH.forget_injective_of_eq_bot |
| 88 | (F : CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}) {W V : Opens X} |
| 89 | (f : W ⟶ V) (hW : W = ⊥) (n : ℕ) : |
| 90 | Function.Injective (OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.relH.forget F f n) := |
| 91 | haveI : Fact (W = ⊥) := ⟨hW⟩ |
| 92 | (OAI.CategoryTheory.Sites.SheafCohomologyPair.Abelian.Ext.precompAddEquiv (asIso (cokernel.π |
| 93 | ((OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.freeAbelianSheaf (Opens.grothendieckTopology X)).map f))) F n).injective |
| 94 | |
| 95 | variable {X} (Z : Closeds X) |
| 96 | (F : CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}) |
| 97 | |
| 98 | /-- `H^n_Z(X; F) → H^n(X; F)`, forgetting the support. -/ |
| 99 | def supportH.forget (n : ℕ) : H_[Z]^n(X; F) →+ F.H n := |
| 100 | (OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.H'.addEquivTerminal isTerminalTop F n).toAddMonoidHom.comp |
| 101 | (OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.relH.forget F _ n) |
| 102 | |
| 103 | /-- The map on cohomology with support induced by a morphism of sheaves. -/ |
| 104 | def supportH.map {F G : CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}} |
| 105 | (g : F ⟶ G) (n : ℕ) : H_[Z]^n(X; F) →+ H_[Z]^n(X; G) := |
| 106 | OAI.CategoryTheory.Sites.SheafCohomologyPair.Sheaf.relH.map _ g n |
| 107 | |
| 108 | end |
| 109 | |
| 110 | end OAI.AlgebraicTopology.Support.Cohomology.TopCat.Sheaf |