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.LinearDual |
| 18 | import Mathlib.LinearAlgebra.Dual.Lemmas |
| 19 | |
| 20 | /-! # Linear Dual Homotopy -/ |
| 21 | |
| 22 | namespace OAI.Algebra.Homology.LinearDualHomotopy |
| 23 | |
| 24 | noncomputable section |
| 25 | |
| 26 | open _root_.CategoryTheory |
| 27 | open _root_.CategoryTheory.ShortComplex |
| 28 | open _root_.HomologicalComplex |
| 29 | |
| 30 | /-! |
| 31 | # Constructions used only in proofs |
| 32 | |
| 33 | -/ |
| 34 | |
| 35 | open Limits |
| 36 | |
| 37 | universe u |
| 38 | |
| 39 | namespace CategoryTheory.ShortComplex |
| 40 | |
| 41 | variable {R : Type u} [CommRing R] |
| 42 | |
| 43 | /-- Dualising a splitting of a short complex of modules gives a splitting of the reversed dual |
| 44 | short complex: the retraction and the section swap roles. -/ |
| 45 | def Splitting.linearDual {S : ShortComplex (ModuleCat.{u} R)} (h : S.Splitting) : |
| 46 | (LinearDual.CategoryTheory.ShortComplex.linearDual S).Splitting where |
| 47 | r := ModuleCat.ofHom h.s.hom.dualMap |
| 48 | s := ModuleCat.ofHom h.r.hom.dualMap |
| 49 | f_r := by |
| 50 | apply ModuleCat.hom_ext |
| 51 | apply LinearMap.ext |
| 52 | intro φ |
| 53 | change Module.Dual R S.X₃ at φ |
| 54 | exact LinearMap.ext fun x => congrArg φ (ConcreteCategory.congr_hom h.s_g x) |
| 55 | s_g := by |
| 56 | apply ModuleCat.hom_ext |
| 57 | apply LinearMap.ext |
| 58 | intro φ |
| 59 | change Module.Dual R S.X₁ at φ |
| 60 | exact LinearMap.ext fun x => congrArg φ (ConcreteCategory.congr_hom h.f_r x) |
| 61 | id := by |
| 62 | apply ModuleCat.hom_ext |
| 63 | apply LinearMap.ext |
| 64 | intro φ |
| 65 | change Module.Dual R S.X₂ at φ |
| 66 | refine LinearMap.ext fun x => ?_ |
| 67 | change φ (h.s.hom (S.g.hom x)) + φ (S.f.hom (h.r.hom x)) = φ x |
| 68 | rw [← map_add] |
| 69 | refine congrArg φ ?_ |
| 70 | have hx := ConcreteCategory.congr_hom h.id x |
| 71 | change S.f.hom (h.r.hom x) + h.s.hom (S.g.hom x) = x at hx |
| 72 | rw [add_comm] |
| 73 | exact hx |
| 74 | |
| 75 | end CategoryTheory.ShortComplex |
| 76 | |
| 77 | namespace HomologicalComplex |
| 78 | |
| 79 | variable {R : Type u} [CommRing R] |
| 80 | |
| 81 | attribute [simp] LinearDual.HomologicalComplex.linearDualCochainComplex_X |
| 82 | |
| 83 | attribute [local implicit_reducible] shortComplexFunctor' shortComplexFunctor |
| 84 | |
| 85 | variable {K L M : ChainComplex (ModuleCat.{u} R) ℕ} |
| 86 | |
| 87 | lemma ModuleCat.ofHom_sub.{v} {R : Type*} [Ring R] {M N : Type v} [AddCommGroup M] |
| 88 | [Module R M] [AddCommGroup N] [Module R N] (f g : M →ₗ[R] N) : |
| 89 | ModuleCat.ofHom (f - g) = ModuleCat.ofHom f - ModuleCat.ofHom g := rfl |
| 90 | |
| 91 | open Homotopy in |
| 92 | /-- Algebraic duality sends a chain homotopy contravariantly to a cochain homotopy. -/ |
| 93 | def linearDualHomotopy {f g : K ⟶ L} (h : Homotopy f g) : |
| 94 | Homotopy (LinearDual.HomologicalComplex.linearDualMap f) (LinearDual.HomologicalComplex.linearDualMap g) where |
| 95 | hom i j := ModuleCat.ofHom (h.hom j i).hom.dualMap |
| 96 | zero i j hij := by simp [h.zero j i hij] |
| 97 | comm i := by |
| 98 | cases i with |
| 99 | | zero => |
| 100 | rw [dNext_cochainComplex, prevD_zero_cochainComplex, LinearDual.HomologicalComplex.linearDualCochainComplex_d_succ] |
| 101 | have h' : f.f 0 - g.f 0 = h.hom 0 1 ≫ L.d 1 0 := by |
| 102 | simpa [dNext_zero_chainComplex _, prevD_chainComplex _, ← sub_eq_iff_eq_add] using h.comm 0 |
| 103 | simp [← ModuleCat.ofHom_comp, LinearMap.dualMap_comp_dualMap, ← ModuleCat.hom_comp, ← h', |
| 104 | OAI.LinearAlgebra.Foundations.DualDefs.LinearMap.dualMap_sub, HomologicalComplex.ModuleCat.ofHom_sub] |
| 105 | | succ n => |
| 106 | rw [Homotopy.dNext_cochainComplex, Homotopy.prevD_succ_cochainComplex] |
| 107 | have h': f.f (n + 1) - g.f (n + 1) = h.hom (n + 1) (n + 1 + 1) ≫ |
| 108 | L.d (n + 1 + 1) (n + 1) + K.d (n + 1) n ≫ h.hom n (n + 1) := by |
| 109 | simpa [dNext_succ_chainComplex _, prevD_chainComplex _, ← sub_eq_iff_eq_add, |
| 110 | add_comm (K.d _ _ ≫ _)] using h.comm (n + 1) |
| 111 | simp [← ModuleCat.ofHom_comp, ← ModuleCat.ofHom_add, LinearMap.dualMap_comp_dualMap, |
| 112 | ← ModuleCat.hom_comp, ← OAI.LinearAlgebra.Foundations.DualDefs.LinearMap.dualMap_add, ← ModuleCat.hom_add, ← h'] |
| 113 | |
| 114 | /-- Algebraic duality sends a chain-homotopy equivalence contravariantly to a cochain-homotopy |
| 115 | equivalence. -/ |
| 116 | def linearDualHomotopyEquiv (e : HomotopyEquiv K L) : |
| 117 | HomotopyEquiv (LinearDual.HomologicalComplex.linearDualCochainComplex L) (LinearDual.HomologicalComplex.linearDualCochainComplex K) where |
| 118 | hom := LinearDual.HomologicalComplex.linearDualMap e.hom |
| 119 | inv := LinearDual.HomologicalComplex.linearDualMap e.inv |
| 120 | homotopyHomInvId := |
| 121 | (Homotopy.ofEq (LinearDual.HomologicalComplex.linearDualMap_comp e.inv e.hom).symm).trans <| |
| 122 | (linearDualHomotopy e.homotopyInvHomId).trans <| |
| 123 | Homotopy.ofEq (LinearDual.HomologicalComplex.linearDualMap_id L) |
| 124 | homotopyInvHomId := |
| 125 | (Homotopy.ofEq (LinearDual.HomologicalComplex.linearDualMap_comp e.hom e.inv).symm).trans <| |
| 126 | (linearDualHomotopy e.homotopyHomInvId).trans <| |
| 127 | Homotopy.ofEq (LinearDual.HomologicalComplex.linearDualMap_id K) |
| 128 | |
| 129 | end HomologicalComplex |
| 130 | |
| 131 | end |
| 132 | |
| 133 | end OAI.Algebra.Homology.LinearDualHomotopy |