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.LinearDualHomotopy |
| 18 | |
| 19 | /-! # Linear Dual Naturality -/ |
| 20 | |
| 21 | namespace OAI.Algebra.Homology.LinearDualNaturality |
| 22 | |
| 23 | noncomputable section |
| 24 | |
| 25 | open _root_.CategoryTheory |
| 26 | open _root_.CategoryTheory.ShortComplex |
| 27 | open _root_.HomologicalComplex |
| 28 | |
| 29 | /-! |
| 30 | # Naturality of linear duality on homology |
| 31 | |
| 32 | Concrete cycle representatives and the canonical universal-coefficient equivalence are |
| 33 | compatible with morphisms of short complexes. These identities are used to descend |
| 34 | geometric cap-product identities in the cohomology variable. |
| 35 | |
| 36 | The same holds one level up: the universal-coefficient equivalence |
| 37 | `HomologicalComplex.linearDualHomologyEquiv` between the cohomology of the linear-dual cochain |
| 38 | complex and the dual of homology intertwines the dualised cochain map with the dual of the |
| 39 | homology map. |
| 40 | -/ |
| 41 | |
| 42 | universe u |
| 43 | |
| 44 | namespace CategoryTheory.ShortComplex |
| 45 | |
| 46 | section CommRing |
| 47 | variable {R : Type u} [CommRing R] |
| 48 | |
| 49 | /-- The canonical class of an explicit cycle in a short complex of modules. -/ |
| 50 | def moduleCatHomologyClass (S : ShortComplex (ModuleCat.{u} R)) : |
| 51 | LinearMap.ker S.g.hom →ₗ[R] S.homology := |
| 52 | S.moduleCatHomologyIso.inv.hom.comp (LinearMap.range S.moduleCatToCycles).mkQ |
| 53 | |
| 54 | /-- Every homology class has an explicit cycle representative. -/ |
| 55 | lemma moduleCatHomologyClass_surjective (S : ShortComplex (ModuleCat.{u} R)) : |
| 56 | Function.Surjective (moduleCatHomologyClass S) := |
| 57 | S.moduleCatHomologyIso.toLinearEquiv.symm.surjective.comp |
| 58 | (Submodule.mkQ_surjective _) |
| 59 | |
| 60 | set_option backward.isDefEq.respectTransparency false in |
| 61 | /-- A morphism of short complexes sends cycles to cycles. -/ |
| 62 | def moduleCatCycleMap {S T : ShortComplex (ModuleCat.{u} R)} (f : S ⟶ T) : |
| 63 | LinearMap.ker S.g.hom →ₗ[R] LinearMap.ker T.g.hom := |
| 64 | f.τ₂.hom.restrict (fun x hx ↦ by |
| 65 | change T.g.hom (f.τ₂.hom x) = 0 |
| 66 | have h := ConcreteCategory.congr_hom f.comm₂₃ x |
| 67 | change T.g.hom (f.τ₂.hom x) = f.τ₃.hom (S.g.hom x) at h |
| 68 | rwa [show S.g.hom x = 0 from hx, map_zero] at h) |
| 69 | |
| 70 | set_option backward.isDefEq.respectTransparency false in |
| 71 | lemma moduleCatCyclesIso_inv_cycleMap {S T : ShortComplex (ModuleCat.{u} R)} |
| 72 | (f : S ⟶ T) : |
| 73 | S.moduleCatCyclesIso.inv ≫ cyclesMap f = |
| 74 | ModuleCat.ofHom (moduleCatCycleMap f) ≫ T.moduleCatCyclesIso.inv := by |
| 75 | rw [← cancel_mono T.iCycles] |
| 76 | simp only [Category.assoc, ShortComplex.cyclesMap_i, moduleCatCyclesIso_inv_iCycles_assoc, |
| 77 | moduleCatCyclesIso_inv_iCycles] |
| 78 | rfl |
| 79 | |
| 80 | set_option backward.isDefEq.respectTransparency false in |
| 81 | /-- Taking the class of a cycle commutes with the induced homology map. -/ |
| 82 | lemma moduleCatHomologyClass_naturality {S T : ShortComplex (ModuleCat.{u} R)} |
| 83 | (f : S ⟶ T) (x : LinearMap.ker S.g.hom) : |
| 84 | (homologyMap f).hom ((moduleCatHomologyClass S) x) = |
| 85 | (moduleCatHomologyClass T) (moduleCatCycleMap f x) := by |
| 86 | have h : |
| 87 | S.moduleCatCyclesIso.inv ≫ S.homologyπ ≫ homologyMap f = |
| 88 | ModuleCat.ofHom (moduleCatCycleMap f) ≫ T.moduleCatCyclesIso.inv ≫ T.homologyπ := by |
| 89 | rw [ShortComplex.homologyπ_naturality, ← Category.assoc, moduleCatCyclesIso_inv_cycleMap, |
| 90 | Category.assoc] |
| 91 | exact ConcreteCategory.congr_hom h x |
| 92 | |
| 93 | set_option backward.isDefEq.respectTransparency false in |
| 94 | /-- Reversed linear-dual short complexes are contravariantly functorial. -/ |
| 95 | def linearDualMap {S T : ShortComplex (ModuleCat.{u} R)} (f : S ⟶ T) : |
| 96 | (LinearDual.CategoryTheory.ShortComplex.linearDual T) ⟶ (LinearDual.CategoryTheory.ShortComplex.linearDual S) where |
| 97 | τ₁ := ModuleCat.ofHom f.τ₃.hom.dualMap |
| 98 | τ₂ := ModuleCat.ofHom f.τ₂.hom.dualMap |
| 99 | τ₃ := ModuleCat.ofHom f.τ₁.hom.dualMap |
| 100 | comm₁₂ := by |
| 101 | apply ModuleCat.hom_ext |
| 102 | apply LinearMap.ext |
| 103 | intro phi |
| 104 | change Module.Dual R T.X₃ at phi |
| 105 | apply LinearMap.ext |
| 106 | intro x |
| 107 | exact congrArg phi (ConcreteCategory.congr_hom f.comm₂₃ x).symm |
| 108 | comm₂₃ := by |
| 109 | apply ModuleCat.hom_ext |
| 110 | apply LinearMap.ext |
| 111 | intro phi |
| 112 | change Module.Dual R T.X₂ at phi |
| 113 | apply LinearMap.ext |
| 114 | intro x |
| 115 | exact congrArg phi (ConcreteCategory.congr_hom f.comm₁₂ x).symm |
| 116 | |
| 117 | end CommRing |
| 118 | |
| 119 | variable {R : Type u} [Field R] |
| 120 | |
| 121 | set_option backward.isDefEq.respectTransparency false in |
| 122 | /-- Universal coefficients evaluate a dual cycle on an ordinary cycle without any |
| 123 | choice of generators or representatives in the resulting pairing. -/ |
| 124 | lemma linearDualHomologyEquiv_class_apply_class (S : ShortComplex (ModuleCat.{u} R)) |
| 125 | (phi : LinearMap.ker S.f.hom.dualMap) (x : LinearMap.ker S.g.hom) : |
| 126 | (LinearDual.CategoryTheory.ShortComplex.linearDualHomologyEquiv S) ((moduleCatHomologyClass (LinearDual.CategoryTheory.ShortComplex.linearDual S)) phi) |
| 127 | ((moduleCatHomologyClass S) x) = (phi.1 : Module.Dual R S.X₂) x.1 := by |
| 128 | change (LinearDual.CategoryTheory.ShortComplex.dualHomologyComparisonExplicit S) |
| 129 | ((LinearDual.CategoryTheory.ShortComplex.linearDual S).moduleCatHomologyIso.hom.hom |
| 130 | ((LinearDual.CategoryTheory.ShortComplex.linearDual S).moduleCatHomologyIso.inv.hom (Submodule.Quotient.mk phi))) |
| 131 | (S.moduleCatHomologyIso.hom.hom |
| 132 | (S.moduleCatHomologyIso.inv.hom (Submodule.Quotient.mk x))) = |
| 133 | (phi.1 : Module.Dual R S.X₂) x.1 |
| 134 | have hphi := ConcreteCategory.congr_hom |
| 135 | (LinearDual.CategoryTheory.ShortComplex.linearDual S).moduleCatHomologyIso.inv_hom_id (Submodule.Quotient.mk phi) |
| 136 | have hx := ConcreteCategory.congr_hom |
| 137 | S.moduleCatHomologyIso.inv_hom_id (Submodule.Quotient.mk x) |
| 138 | change (LinearDual.CategoryTheory.ShortComplex.linearDual S).moduleCatHomologyIso.hom.hom |
| 139 | ((LinearDual.CategoryTheory.ShortComplex.linearDual S).moduleCatHomologyIso.inv.hom (Submodule.Quotient.mk phi)) = |
| 140 | Submodule.Quotient.mk phi at hphi |
| 141 | change S.moduleCatHomologyIso.hom.hom |
| 142 | (S.moduleCatHomologyIso.inv.hom (Submodule.Quotient.mk x)) = |
| 143 | Submodule.Quotient.mk x at hx |
| 144 | rw [hphi, hx] |
| 145 | rfl |
| 146 | |
| 147 | set_option backward.isDefEq.respectTransparency false in |
| 148 | /-- The universal-coefficient equivalence is natural in the complex. -/ |
| 149 | theorem linearDualHomologyEquiv_naturality |
| 150 | {S T : ShortComplex (ModuleCat.{u} R)} (f : S ⟶ T) |
| 151 | (alpha : (LinearDual.CategoryTheory.ShortComplex.linearDual T).homology) : |
| 152 | (LinearDual.CategoryTheory.ShortComplex.linearDualHomologyEquiv S) ((homologyMap (linearDualMap f)).hom alpha) = |
| 153 | (homologyMap f).hom.dualMap ((LinearDual.CategoryTheory.ShortComplex.linearDualHomologyEquiv T) alpha) := by |
| 154 | obtain ⟨phi, rfl⟩ := (moduleCatHomologyClass_surjective (LinearDual.CategoryTheory.ShortComplex.linearDual T)) alpha |
| 155 | apply LinearMap.ext |
| 156 | intro c |
| 157 | obtain ⟨x, rfl⟩ := (moduleCatHomologyClass_surjective S) c |
| 158 | change (LinearDual.CategoryTheory.ShortComplex.linearDualHomologyEquiv S) |
| 159 | ((homologyMap (linearDualMap f)).hom ((moduleCatHomologyClass (LinearDual.CategoryTheory.ShortComplex.linearDual T)) phi)) |
| 160 | ((moduleCatHomologyClass S) x) = |
| 161 | (LinearDual.CategoryTheory.ShortComplex.linearDualHomologyEquiv T) ((moduleCatHomologyClass (LinearDual.CategoryTheory.ShortComplex.linearDual T)) phi) |
| 162 | ((homologyMap f).hom ((moduleCatHomologyClass S) x)) |
| 163 | rw [moduleCatHomologyClass_naturality, moduleCatHomologyClass_naturality, |
| 164 | linearDualHomologyEquiv_class_apply_class, linearDualHomologyEquiv_class_apply_class] |
| 165 | rfl |
| 166 | |
| 167 | end CategoryTheory.ShortComplex |
| 168 | |
| 169 | namespace HomologicalComplex |
| 170 | |
| 171 | section CommRing |
| 172 | variable {R : Type u} [CommRing R] |
| 173 | {K L : ChainComplex (ModuleCat.{u} R) ℕ} |
| 174 | |
| 175 | set_option backward.defeqAttrib.useBackward true in |
| 176 | set_option backward.isDefEq.respectTransparency false in |
| 177 | /-- The degreewise short-complex dual identification preserves maps. -/ |
| 178 | lemma linearDualCochainComplexScIso_naturality (f : K ⟶ L) (n : ℕ) : |
| 179 | (shortComplexFunctor (ModuleCat R) (.up ℕ) n).map (LinearDual.HomologicalComplex.linearDualMap f) ≫ |
| 180 | (LinearDual.HomologicalComplex.linearDualCochainComplexScIso K n).hom = |
| 181 | (LinearDual.HomologicalComplex.linearDualCochainComplexScIso L n).hom ≫ |
| 182 | CategoryTheory.ShortComplex.linearDualMap ((shortComplexFunctor (ModuleCat R) (.down ℕ) n).map f) := rfl |
| 183 | |
| 184 | end CommRing |
| 185 | |
| 186 | variable {R : Type u} [Field R] |
| 187 | {K L : ChainComplex (ModuleCat.{u} R) ℕ} |
| 188 | |
| 189 | set_option backward.defeqAttrib.useBackward true in |
| 190 | set_option backward.isDefEq.respectTransparency false in |
| 191 | /-- The universal-coefficient identification intertwines the dual |
| 192 | cochain map with the dual of the homology map. -/ |
| 193 | lemma linearDualHomologyEquiv_naturality (f : K ⟶ L) (n : ℕ) |
| 194 | (a : (LinearDual.HomologicalComplex.linearDualCochainComplex L).homology n) (z : K.homology n) : |
| 195 | LinearDual.HomologicalComplex.linearDualHomologyEquiv K n (homologyMap (LinearDual.HomologicalComplex.linearDualMap f) n a) z = |
| 196 | LinearDual.HomologicalComplex.linearDualHomologyEquiv L n a (homologyMap f n z) := by |
| 197 | have h := congrArg (ShortComplex.homologyFunctor (ModuleCat R)).map |
| 198 | (linearDualCochainComplexScIso_naturality f n) |
| 199 | rw [Functor.map_comp, Functor.map_comp] at h |
| 200 | have ha := ConcreteCategory.congr_hom h a |
| 201 | change (LinearDual.CategoryTheory.ShortComplex.linearDualHomologyEquiv (K.sc n)) |
| 202 | (ShortComplex.homologyMap (LinearDual.HomologicalComplex.linearDualCochainComplexScIso K n).hom |
| 203 | (homologyMap (LinearDual.HomologicalComplex.linearDualMap f) n a)) z = _ |
| 204 | rw [show ShortComplex.homologyMap (LinearDual.HomologicalComplex.linearDualCochainComplexScIso K n).hom |
| 205 | (homologyMap (LinearDual.HomologicalComplex.linearDualMap f) n a) = |
| 206 | ShortComplex.homologyMap |
| 207 | (CategoryTheory.ShortComplex.linearDualMap ((shortComplexFunctor (ModuleCat R) (.down ℕ) n).map f)) |
| 208 | (ShortComplex.homologyMap (LinearDual.HomologicalComplex.linearDualCochainComplexScIso L n).hom a) from ha] |
| 209 | exact congrArg (fun α => α z) (CategoryTheory.ShortComplex.linearDualHomologyEquiv_naturality _ _) |
| 210 | |
| 211 | end HomologicalComplex |
| 212 | |
| 213 | end |
| 214 | |
| 215 | end OAI.Algebra.Homology.LinearDualNaturality |