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.Algebra.Homology.Notation |
| 18 | import OAI.AlgebraicTopology.Sheaf.FlasqueBoundedBelow |
| 19 | |
| 20 | /-! # Flasque Bounded Is -/ |
| 21 | |
| 22 | namespace OAI.AlgebraicTopology.Sheaf.FlasqueBoundedIs.TopCat.IsFlasque |
| 23 | |
| 24 | noncomputable section |
| 25 | |
| 26 | open _root_.TopCat |
| 27 | open _root_.TopCat.Sheaf |
| 28 | open _root_.TopCat.Sheaf.IsFlasque |
| 29 | |
| 30 | /-! |
| 31 | # Global sections of bounded-below exact flasque complexes |
| 32 | |
| 33 | -/ |
| 34 | |
| 35 | /-! ### Constructions used only in proofs -/ |
| 36 | |
| 37 | section |
| 38 | |
| 39 | open _root_.CategoryTheory Limits Opposite _root_.TopologicalSpace |
| 40 | |
| 41 | universe u |
| 42 | |
| 43 | variable {X : TopCat.{u}} |
| 44 | |
| 45 | namespace BoundedBelowComplex |
| 46 | |
| 47 | variable (K : CochainComplex (TopCat.Sheaf AddCommGrpCat.{u} X) ℤ) |
| 48 | |
| 49 | /-- The short exact sequence from cycles in degree `i`, through the degree-`i` term, to cycles |
| 50 | in degree `i + 1`. -/ |
| 51 | def cyclesShortComplex (i : ℤ) : |
| 52 | ShortComplex (TopCat.Sheaf AddCommGrpCat.{u} X) := |
| 53 | ShortComplex.mk (K.iCycles i) (K.toCycles i (i + 1)) (by |
| 54 | rw [← cancel_mono (K.iCycles (i + 1))] |
| 55 | simp) |
| 56 | |
| 57 | end BoundedBelowComplex |
| 58 | |
| 59 | end |
| 60 | |
| 61 | open _root_.CategoryTheory Limits Opposite _root_.TopologicalSpace |
| 62 | |
| 63 | universe u |
| 64 | |
| 65 | variable {X : TopCat.{u}} |
| 66 | |
| 67 | /-- A zero sheaf is flasque. -/ |
| 68 | lemma of_isZero (F : TopCat.Sheaf AddCommGrpCat.{u} X) (hF : IsZero F) : F.IsFlasque where |
| 69 | epi {U V} i := by |
| 70 | have hobj : IsZero F.obj := |
| 71 | (TopCat.Sheaf.forget AddCommGrpCat X).map_isZero hF |
| 72 | have hV : IsZero (F.presheaf.obj V) := |
| 73 | ((evaluation (Opens X)ᵒᵖ AddCommGrpCat).obj V).map_isZero hobj |
| 74 | exact hV.epi (F.obj.map i) |
| 75 | |
| 76 | namespace BoundedBelowComplex |
| 77 | |
| 78 | variable (K : CochainComplex (TopCat.Sheaf AddCommGrpCat.{u} X) ℤ) |
| 79 | |
| 80 | lemma cyclesShortComplex_shortExact (i : ℤ) (hK : K.ExactAt (i + 1)) : |
| 81 | (cyclesShortComplex K i).ShortExact := by |
| 82 | let S := cyclesShortComplex K i |
| 83 | have hkerD := K.cyclesIsKernel i (i + 1) (by simp) |
| 84 | have hker : IsLimit (KernelFork.ofι S.f S.zero) := |
| 85 | Limits.isKernelOfComp (K.iCycles (i + 1)) (K.d i (i + 1)) hkerD |
| 86 | S.zero (K.toCycles_i i (i + 1)) |
| 87 | have hepi : Epi S.g := by |
| 88 | dsimp [S, cyclesShortComplex] |
| 89 | have hnext : (ℤᵘᵖ).next (i + 1) = i + 2 := |
| 90 | (ℤᵘᵖ).next_eq' (ComplexShape.up_mk _ _ (by lia)) |
| 91 | have hsc' : (K.sc' i (i + 1) (i + 2)).Exact := |
| 92 | (K.exactAt_iff' (i := i) (j := i + 1) (k := i + 2) (by simp) hnext).mp hK |
| 93 | have hepi' : Epi ((K.sc' i (i + 1) (i + 2)).toCycles) := |
| 94 | hsc'.epi_toCycles |
| 95 | rw [← K.toCycles_cyclesIsoSc'_hom i (i + 1) (i + 2) (by simp) hnext] at hepi' |
| 96 | let e := K.cyclesIsoSc' i (i + 1) (i + 2) (by simp) hnext |
| 97 | have hfac : K.toCycles i (i + 1) = |
| 98 | (K.toCycles i (i + 1) ≫ e.hom) ≫ e.inv := by |
| 99 | simp only [Category.assoc, Iso.hom_inv_id, Category.comp_id] |
| 100 | let : Epi (K.toCycles i (i + 1) ≫ e.hom) := hepi' |
| 101 | rw [hfac] |
| 102 | infer_instance |
| 103 | have hmono : Mono S.f := by |
| 104 | dsimp [S, cyclesShortComplex] |
| 105 | infer_instance |
| 106 | exact |
| 107 | { exact := S.exact_of_f_is_kernel hker |
| 108 | mono_f := hmono |
| 109 | epi_g := hepi } |
| 110 | |
| 111 | /-- The cycle sheaves in every degree at or above a strict lower bound are flasque. -/ |
| 112 | lemma cycles_isFlasque_add_nat (N : ℤ) [K.IsStrictlyGE N] |
| 113 | (hK : K.Acyclic) (hflasque : ∀ i, (K.X i).IsFlasque) (m : ℕ) : |
| 114 | (K.cycles (N + (m : ℤ))).IsFlasque := by |
| 115 | induction m with |
| 116 | | zero => |
| 117 | let S := cyclesShortComplex K (N - 1) |
| 118 | have hS : S.ShortExact := by |
| 119 | apply cyclesShortComplex_shortExact K (N - 1) |
| 120 | simpa only [sub_add_cancel] using hK N |
| 121 | have hsource : IsZero S.X₂ := by |
| 122 | dsimp [S, cyclesShortComplex] |
| 123 | exact K.isZero_of_isStrictlyGE N (N - 1) (by lia) |
| 124 | let : Epi S.g := hS.epi_g |
| 125 | have htarget : IsZero S.X₃ := IsZero.of_epi S.g hsource |
| 126 | have hzero : IsZero (K.cycles N) := by |
| 127 | simpa only [S, cyclesShortComplex, sub_add_cancel] using htarget |
| 128 | simpa using of_isZero (K.cycles N) hzero |
| 129 | | succ m ih => |
| 130 | let i : ℤ := N + (m : ℤ) |
| 131 | let S := cyclesShortComplex K i |
| 132 | have hS : S.ShortExact := cyclesShortComplex_shortExact K i (hK (i + 1)) |
| 133 | let : S.X₁.IsFlasque := by |
| 134 | dsimp [S, cyclesShortComplex, i] |
| 135 | exact ih |
| 136 | let : S.X₂.IsFlasque := by |
| 137 | dsimp [S, cyclesShortComplex] |
| 138 | exact hflasque i |
| 139 | have htarget : S.X₃.IsFlasque := of_shortExact_of_isFlasque₁₂ hS |
| 140 | simpa only [Nat.cast_succ, i, S, cyclesShortComplex, add_assoc] using htarget |
| 141 | |
| 142 | /-- Every cycle sheaf of an acyclic bounded-below complex of flasque sheaves is flasque. -/ |
| 143 | lemma cycles_isFlasque (N : ℤ) [K.IsStrictlyGE N] |
| 144 | (hK : K.Acyclic) (hflasque : ∀ i, (K.X i).IsFlasque) (i : ℤ) : |
| 145 | (K.cycles i).IsFlasque := by |
| 146 | by_cases hi : i < N |
| 147 | · exact of_isZero _ (IsZero.of_mono (K.iCycles i) (K.isZero_of_isStrictlyGE N i hi)) |
| 148 | · let m : ℕ := (i - N).toNat |
| 149 | have hm : i = N + (m : ℤ) := by |
| 150 | dsimp [m] |
| 151 | rw [Int.toNat_of_nonneg (by lia)] |
| 152 | lia |
| 153 | rw [hm] |
| 154 | exact cycles_isFlasque_add_nat K N hK hflasque m |
| 155 | |
| 156 | /-- Global sections preserve exactness of an acyclic bounded-below complex of flasque sheaves. -/ |
| 157 | theorem globalSectionsComplex_acyclic (N : ℤ) [K.IsStrictlyGE N] |
| 158 | (hK : K.Acyclic) (hflasque : ∀ i, (K.X i).IsFlasque) : |
| 159 | (FlasqueBoundedBelow.TopCat.IsFlasque.BoundedBelowComplex.globalSectionsComplex K).Acyclic := by |
| 160 | intro i |
| 161 | let F := FlasqueBoundedBelow.TopCat.IsFlasque.BoundedBelowComplex.globalSectionsFunctor X |
| 162 | let L := FlasqueBoundedBelow.TopCat.IsFlasque.BoundedBelowComplex.globalSectionsComplex K |
| 163 | let A : ShortComplex (TopCat.Sheaf AddCommGrpCat.{u} X) := |
| 164 | ShortComplex.mk (K.iCycles i) (K.d i (i + 1)) (K.iCycles_d i (i + 1)) |
| 165 | have hA : A.Exact ∧ Mono A.f := by |
| 166 | have hker := K.cyclesIsKernel i (i + 1) (by simp) |
| 167 | refine ⟨A.exact_of_f_is_kernel ?_, ?_⟩ |
| 168 | · simpa only [A] using hker |
| 169 | · dsimp [A] |
| 170 | infer_instance |
| 171 | have hFA : (A.map F).Exact := by |
| 172 | have hleft := ((Functor.preservesFiniteLimits_tfae F).out 4 2).mp |
| 173 | (inferInstance : PreservesFiniteLimits F) |
| 174 | exact (hleft A hA).1 |
| 175 | let Sprev := cyclesShortComplex K (i - 1) |
| 176 | have hSprev : Sprev.ShortExact := by |
| 177 | apply cyclesShortComplex_shortExact K (i - 1) |
| 178 | simpa only [sub_add_cancel] using hK i |
| 179 | let : Sprev.X₁.IsFlasque := by |
| 180 | dsimp [Sprev, cyclesShortComplex] |
| 181 | exact cycles_isFlasque K N hK hflasque (i - 1) |
| 182 | have hepiTop : Epi (Sprev.g.hom.app (op (⊤ : Opens X))) := |
| 183 | epi_of_shortExact (U := (⊤ : Opens X)) hSprev |
| 184 | have hepi : Epi (F.map (K.toCycles (i - 1) i)) := by |
| 185 | change Epi ((K.toCycles (i - 1) i).hom.app (op (⊤ : Opens X))) |
| 186 | have hi : i - 1 + 1 = i := by lia |
| 187 | change Epi ((K.toCycles (i - 1) (i - 1 + 1)).hom.app |
| 188 | (op (⊤ : Opens X))) at hepiTop |
| 189 | rw [hi] at hepiTop |
| 190 | exact hepiTop |
| 191 | have hprev : (ℤᵘᵖ).prev i = i - 1 := |
| 192 | (ℤᵘᵖ).prev_eq' (ComplexShape.up_mk _ _ (by lia)) |
| 193 | have hnext : (ℤᵘᵖ).next i = i + 1 := |
| 194 | (ℤᵘᵖ).next_eq' (ComplexShape.up_mk _ _ rfl) |
| 195 | let T : ShortComplex AddCommGrpCat.{u} := |
| 196 | ShortComplex.mk (F.map (K.d (i - 1) i)) (F.map (K.d i (i + 1))) (by |
| 197 | rw [← F.map_comp, K.d_comp_d, F.map_zero]) |
| 198 | let B : ShortComplex AddCommGrpCat.{u} := |
| 199 | ShortComplex.mk (F.map (K.iCycles i)) (F.map (K.d i (i + 1))) (by |
| 200 | rw [← F.map_comp, K.iCycles_d, F.map_zero]) |
| 201 | have hB : B.Exact := hFA |
| 202 | let φ : T ⟶ B := |
| 203 | { τ₁ := F.map (K.toCycles (i - 1) i) |
| 204 | τ₂ := 𝟙 _ |
| 205 | τ₃ := 𝟙 _ |
| 206 | comm₁₂ := by |
| 207 | dsimp [T, B] |
| 208 | rw [Category.comp_id, ← F.map_comp, K.toCycles_i] |
| 209 | comm₂₃ := by |
| 210 | dsimp [T, B] |
| 211 | simp } |
| 212 | apply (L.exactAt_iff' (i := i - 1) (j := i) (k := i + 1) hprev hnext).mpr |
| 213 | exact (ShortComplex.exact_iff_of_epi_of_isIso_of_mono φ).mpr hB |
| 214 | |
| 215 | end BoundedBelowComplex |
| 216 | |
| 217 | end |
| 218 | |
| 219 | end OAI.AlgebraicTopology.Sheaf.FlasqueBoundedIs.TopCat.IsFlasque |