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.AlgebraicTopology.Sheaf.FlasqueBoundedIs |
| 7 | import Mathlib.CategoryTheory.Abelian.Exact |
| 8 | |
| 9 | /-! # Flasque Cokernel -/ |
| 10 | |
| 11 | namespace OAI.AlgebraicTopology.Sheaf.FlasqueCokernel.TopCat.IsFlasque |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open _root_.TopCat |
| 16 | open _root_.TopCat.Sheaf |
| 17 | open _root_.TopCat.Sheaf.IsFlasque |
| 18 | |
| 19 | /-! |
| 20 | # Cokernel preservation for a map with flasque source and kernel |
| 21 | |
| 22 | The sheaf-forgetful functor is not exact in general. For a map whose source and |
| 23 | kernel are flasque, its image is flasque and both associated short exact sequences |
| 24 | remain exact on every open. Consequently its cokernel is preserved by the |
| 25 | forgetful functor. This is a local hypothesis on one map, not a fabricated |
| 26 | exactness instance for the whole forgetful functor. |
| 27 | -/ |
| 28 | |
| 29 | open _root_.CategoryTheory Limits Opposite _root_.TopologicalSpace |
| 30 | |
| 31 | universe u |
| 32 | |
| 33 | variable {X : TopCat.{u}} |
| 34 | |
| 35 | /-- A short exact sequence with flasque first term stays short exact as presheaves. |
| 36 | The epimorphism is proved sectionwise using the flasque lifting theorem. -/ |
| 37 | lemma shortExact_map_forget {S : ShortComplex (TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 38 | (hS : S.ShortExact) [S.X₁.IsFlasque] : |
| 39 | (S.map (TopCat.Sheaf.forget AddCommGrpCat.{u} X)).ShortExact := by |
| 40 | let F := TopCat.Sheaf.forget AddCommGrpCat.{u} X |
| 41 | have hleft := ((Functor.preservesFiniteLimits_tfae F).out 4 2).mp |
| 42 | (inferInstance : PreservesFiniteLimits F) |
| 43 | have he : (S.map F).Exact ∧ Mono (S.map F).f := hleft S ⟨hS.exact, hS.mono_f⟩ |
| 44 | have hg : Epi (F.map S.g) := by |
| 45 | have : ∀ U, Epi ((F.map S.g).app U) := fun U => |
| 46 | epi_of_shortExact (U := U.unop) hS |
| 47 | exact NatTrans.epi_of_epi_app _ |
| 48 | exact { exact := he.1, mono_f := he.2, epi_g := hg } |
| 49 | |
| 50 | variable {A B : TopCat.Sheaf AddCommGrpCat.{u} X} (f : A ⟶ B) |
| 51 | |
| 52 | /-- Let `f: F → G` be a morphism of sheaves of abelian groups on a topological space `X`. This is |
| 53 | the sequence `ker(f) → F → im(f)`, with the kernel inclusion and the canonical map to the image. |
| 54 | The composite is zero. -/ |
| 55 | def kernelImageShortComplex : ShortComplex (TopCat.Sheaf AddCommGrpCat.{u} X) := |
| 56 | ShortComplex.mk (kernel.ι f) (Abelian.factorThruImage f) (by |
| 57 | rw [← cancel_mono (Abelian.image.ι f), zero_comp, Category.assoc, |
| 58 | Abelian.image.fac, kernel.condition]) |
| 59 | |
| 60 | set_option backward.isDefEq.respectTransparency false in |
| 61 | set_option backward.defeqAttrib.useBackward true in |
| 62 | /-- Kernel, source, and image form a short exact sequence. -/ |
| 63 | lemma kernelImageShortComplex_shortExact : (kernelImageShortComplex f).ShortExact := by |
| 64 | let T := ShortComplex.mk (kernel.ι f) f (kernel.condition f) |
| 65 | let φ : kernelImageShortComplex f ⟶ T := |
| 66 | { τ₁ := 𝟙 _ |
| 67 | τ₂ := 𝟙 _ |
| 68 | τ₃ := Abelian.image.ι f |
| 69 | comm₁₂ := by simp [kernelImageShortComplex, T] |
| 70 | comm₂₃ := by simp [kernelImageShortComplex, T] } |
| 71 | have he : (kernelImageShortComplex f).Exact := |
| 72 | (ShortComplex.exact_iff_of_epi_of_isIso_of_mono φ).mpr (ShortComplex.kernelSequence_exact f) |
| 73 | exact { exact := he |
| 74 | mono_f := by dsimp [kernelImageShortComplex]; infer_instance |
| 75 | epi_g := by dsimp [kernelImageShortComplex]; infer_instance } |
| 76 | |
| 77 | /-- Let `f: F → G` be a morphism of sheaves of abelian groups on a topological space `X`. This is |
| 78 | the sequence `im(f) → G → coker(f)`, with the image inclusion and the cokernel projection. The |
| 79 | composite is zero. -/ |
| 80 | def imageCokernelShortComplex : ShortComplex (TopCat.Sheaf AddCommGrpCat.{u} X) := |
| 81 | ShortComplex.mk (Abelian.image.ι f) (cokernel.π f) |
| 82 | (Abelian.image_ι_comp_eq_zero (cokernel.condition f)) |
| 83 | |
| 84 | lemma imageCokernelShortComplex_shortExact : (imageCokernelShortComplex f).ShortExact := by |
| 85 | have he := (ShortComplex.mk f (cokernel.π f) (cokernel.condition f)).exact_iff_exact_image_ι |
| 86 | exact { exact := he.mp (ShortComplex.cokernelSequence_exact f) |
| 87 | mono_f := by dsimp [imageCokernelShortComplex]; infer_instance |
| 88 | epi_g := by dsimp [imageCokernelShortComplex]; infer_instance } |
| 89 | |
| 90 | /-- The image is flasque when both the source and kernel are flasque. -/ |
| 91 | lemma image_isFlasque [A.IsFlasque] [(kernel f).IsFlasque] : (Abelian.image f).IsFlasque := by |
| 92 | let : (kernelImageShortComplex f).X₁.IsFlasque := inferInstanceAs ((kernel f).IsFlasque) |
| 93 | let : (kernelImageShortComplex f).X₂.IsFlasque := inferInstanceAs A.IsFlasque |
| 94 | exact of_shortExact_of_isFlasque₁₂ (kernelImageShortComplex_shortExact f) |
| 95 | |
| 96 | set_option backward.isDefEq.respectTransparency false in |
| 97 | set_option backward.defeqAttrib.useBackward true in |
| 98 | /-- For a map with flasque source and kernel, the forgetful functor preserves its cokernel. -/ |
| 99 | lemma forget_preservesCokernel [A.IsFlasque] [(kernel f).IsFlasque] : |
| 100 | PreservesColimit (parallelPair f 0) (TopCat.Sheaf.forget AddCommGrpCat.{u} X) := by |
| 101 | let F := TopCat.Sheaf.forget AddCommGrpCat.{u} X |
| 102 | let := image_isFlasque f |
| 103 | let : (kernelImageShortComplex f).X₁.IsFlasque := inferInstanceAs ((kernel f).IsFlasque) |
| 104 | let : (imageCokernelShortComplex f).X₁.IsFlasque := inferInstanceAs ((Abelian.image f).IsFlasque) |
| 105 | have h1 := shortExact_map_forget (kernelImageShortComplex_shortExact f) |
| 106 | have h2 := shortExact_map_forget (imageCokernelShortComplex_shortExact f) |
| 107 | let T := ShortComplex.mk f (cokernel.π f) (cokernel.condition f) |
| 108 | let φ : T.map F ⟶ (imageCokernelShortComplex f).map F := |
| 109 | { τ₁ := F.map (Abelian.factorThruImage f) |
| 110 | τ₂ := 𝟙 _ |
| 111 | τ₃ := 𝟙 _ |
| 112 | comm₁₂ := by |
| 113 | dsimp [T, imageCokernelShortComplex] |
| 114 | rw [Category.comp_id, ← F.map_comp, Abelian.image.fac] |
| 115 | comm₂₃ := by simp [T, imageCokernelShortComplex] } |
| 116 | let : Epi φ.τ₁ := h1.epi_g |
| 117 | have he : (T.map F).Exact := |
| 118 | (ShortComplex.exact_iff_of_epi_of_isIso_of_mono φ).mpr h2.exact |
| 119 | let : Epi (T.map F).g := h2.epi_g |
| 120 | exact preservesColimit_of_preserves_colimit_cocone (cokernelIsCokernel f) |
| 121 | ((isColimitMapCoconeCoforkEquiv' F (cokernel.condition f)).symm he.gIsCokernel) |
| 122 | |
| 123 | end |
| 124 | |
| 125 | end OAI.AlgebraicTopology.Sheaf.FlasqueCokernel.TopCat.IsFlasque |