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 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | you may not use this file except in compliance with the License. |
| 5 | You may obtain a copy of the License at |
| 6 | https://www.apache.org/licenses/LICENSE-2.0 |
| 7 | Unless required by applicable law or agreed to in writing, software |
| 8 | distributed under the License is distributed on an "AS IS" BASIS, |
| 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 10 | See the License for the specific language governing permissions and |
| 11 | limitations under the License. |
| 12 | This file has been modified. |
| 13 | -/ |
| 14 | import Mathlib.Algebra.Category.Grp.FilteredColimits |
| 15 | import Mathlib.Algebra.Category.ModuleCat.Presheaf.Sheafification |
| 16 | import Mathlib.CategoryTheory.Sites.ConstantSheaf |
| 17 | import Mathlib.Topology.Sheaves.Sheafify |
| 18 | import Mathlib.Topology.Sheaves.Stalks |
| 19 | |
| 20 | /-! # Map Of Local Stalks -/ |
| 21 | |
| 22 | namespace OAI.AlgebraicTopology.Sheaf.MapOfLocalStalks.TopCat |
| 23 | |
| 24 | noncomputable section |
| 25 | |
| 26 | open _root_.TopCat |
| 27 | open _root_.TopCat.Sheaf |
| 28 | |
| 29 | /-! |
| 30 | # Assembling constant-sheaf maps from locally represented stalk maps |
| 31 | |
| 32 | A pointwise family of additive maps from a fixed group to the stalks assembles into a sheaf map |
| 33 | exactly when each value is locally represented by a section. Unique sheaf gluing then constructs |
| 34 | the map, the stalk formula retains the specified maps exactly, and isomorphisms on stalks give a |
| 35 | sheaf isomorphism. Local representability is a hypothesis, to be discharged by each geometric |
| 36 | application. |
| 37 | -/ |
| 38 | |
| 39 | open _root_.CategoryTheory Limits _root_.TopologicalSpace Opposite |
| 40 | |
| 41 | universe u |
| 42 | |
| 43 | variable {X : TopCat.{u}} (F : TopCat.Sheaf AddCommGrpCat.{u} X) |
| 44 | |
| 45 | /-- A locally represented family of stalk elements has a unique global section. -/ |
| 46 | theorem existsUnique_section_of_locally_representable |
| 47 | (g : ∀ x : X, F.presheaf.stalk x) |
| 48 | (hlocal : ∀ x : X, ∃ (U : Opens X) (_ : x ∈ U) (s : F.presheaf.obj (op U)), |
| 49 | ∀ (y : X) (hy : y ∈ U), F.presheaf.germ U y hy s = g y) : |
| 50 | ∃! s : F.presheaf.obj (op ⊤), ∀ x : X, F.presheaf.Γgerm x s = g x := by |
| 51 | choose U hx s hs using hlocal |
| 52 | have hcover : (⊤ : Opens X) ≤ iSup U := by |
| 53 | intro x _ |
| 54 | exact Opens.mem_iSup.mpr ⟨x, hx x⟩ |
| 55 | have hcompat : TopCat.Presheaf.IsCompatible F.presheaf U s := by |
| 56 | intro x y |
| 57 | apply TopCat.Presheaf.section_ext F |
| 58 | intro z hz |
| 59 | simp only [F.presheaf.germ_res_apply] |
| 60 | exact (hs x z hz.1).trans (hs y z hz.2).symm |
| 61 | obtain ⟨t, ht, _⟩ := F.existsUnique_gluing' U ⊤ (fun _ ↦ homOfLE le_top) |
| 62 | hcover s hcompat |
| 63 | refine ⟨t, ?_, ?_⟩ |
| 64 | · intro x |
| 65 | rw [← F.presheaf.Γgerm_res_apply (i := homOfLE (show U x ≤ ⊤ from le_top)) x (hx x), |
| 66 | ht x] |
| 67 | exact hs x x (hx x) |
| 68 | · intro t' ht' |
| 69 | apply TopCat.Presheaf.section_ext F |
| 70 | intro x _ |
| 71 | change F.presheaf.Γgerm x t' = F.presheaf.Γgerm x t |
| 72 | rw [ht' x, ← F.presheaf.Γgerm_res_apply (i := homOfLE (show U x ≤ ⊤ from le_top)) |
| 73 | x (hx x), ht x, hs x x (hx x)] |
| 74 | |
| 75 | /-- Let `F` be a sheaf of abelian groups on a topological space `X`. Suppose a germ `g(x) ∈ F_x` is |
| 76 | specified for each point, and every point has a neighborhood with a section whose germs equal |
| 77 | `g` throughout that neighborhood. This is the unique global section whose germ at every `x` is |
| 78 | `g(x)`. -/ |
| 79 | def sectionOfLocallyRepresentable |
| 80 | (g : ∀ x : X, F.presheaf.stalk x) |
| 81 | (hlocal : ∀ x : X, ∃ (U : Opens X) (_ : x ∈ U) (s : F.presheaf.obj (op U)), |
| 82 | ∀ (y : X) (hy : y ∈ U), F.presheaf.germ U y hy s = g y) : F.presheaf.obj (op ⊤) := |
| 83 | (existsUnique_section_of_locally_representable F g hlocal).exists.choose |
| 84 | |
| 85 | /-- The glued section has exactly the prescribed germs. -/ |
| 86 | @[simp] |
| 87 | theorem sectionOfLocallyRepresentable_germ |
| 88 | (g : ∀ x : X, F.presheaf.stalk x) |
| 89 | (hlocal : ∀ x : X, ∃ (U : Opens X) (_ : x ∈ U) (s : F.presheaf.obj (op U)), |
| 90 | ∀ (y : X) (hy : y ∈ U), F.presheaf.germ U y hy s = g y) (x : X) : |
| 91 | F.presheaf.Γgerm x (sectionOfLocallyRepresentable F g hlocal) = g x := |
| 92 | (existsUnique_section_of_locally_representable F g hlocal).exists.choose_spec x |
| 93 | |
| 94 | end |
| 95 | |
| 96 | end OAI.AlgebraicTopology.Sheaf.MapOfLocalStalks.TopCat |