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 | |
| 5 | This file has been modified. |
| 6 | -/ |
| 7 | |
| 8 | import Mathlib.Algebra.Homology.HomotopyCategory.HomComplexSingle |
| 9 | import Mathlib.Algebra.Homology.Additive |
| 10 | import Mathlib.CategoryTheory.Preadditive.Yoneda.Basic |
| 11 | |
| 12 | import HodgeConjecture.Mathlib.Algebra.Homology.Notation |
| 13 | |
| 14 | namespace OAI.Algebra.Homology.HomComplexSingle |
| 15 | |
| 16 | open _root_.CochainComplex |
| 17 | open _root_.CochainComplex.HomComplex |
| 18 | |
| 19 | /-! |
| 20 | # The Hom complex out of an object in degree zero |
| 21 | |
| 22 | For an object `X` and a cochain complex `K`, the Hom complex from `X[0]` to `K` is the complex |
| 23 | `n ↦ Hom(X, K^n)`. |
| 24 | -/ |
| 25 | |
| 26 | noncomputable section |
| 27 | |
| 28 | open _root_.CategoryTheory Limits |
| 29 | |
| 30 | namespace CochainComplex |
| 31 | open _root_.CochainComplex |
| 32 | namespace HomComplex |
| 33 | open _root_.CochainComplex |
| 34 | open _root_.CochainComplex.HomComplex |
| 35 | |
| 36 | universe u v |
| 37 | |
| 38 | variable {C : Type u} [Category.{v} C] [Preadditive C] [HasZeroObject C] |
| 39 | |
| 40 | set_option backward.isDefEq.respectTransparency.types false in |
| 41 | set_option backward.isDefEq.respectTransparency false in |
| 42 | /-- Let `C` be a preadditive category with a zero object, `X` an object, and `K` an integer-indexed |
| 43 | cochain complex in `C`. This identifies the Hom complex from `X[0]` to `K` with the complex of |
| 44 | abelian groups `n ↦ Hom_C(X, K^n)`, whose differential is postcomposition with the differential |
| 45 | of `K`. -/ |
| 46 | def fromSingleZeroIsoPreadditiveCoyoneda (X : C) (K : CochainComplex C ℤ) : |
| 47 | CochainComplex.HomComplex ((CochainComplex.singleFunctor C 0).obj X) K ≅ |
| 48 | ((preadditiveCoyoneda.obj (.op X)).mapHomologicalComplex |
| 49 | ℤᵘᵖ).obj K := |
| 50 | HomologicalComplex.Hom.isoOfComponents |
| 51 | (fun n ↦ (Cochain.fromSingleEquiv (p := 0) (q := n) (n := n) |
| 52 | (zero_add n)).toAddCommGrpIso) |
| 53 | (by |
| 54 | intro i j hij |
| 55 | apply AddCommGrpCat.hom_ext |
| 56 | ext z |
| 57 | obtain ⟨f, rfl⟩ := Cochain.fromSingleMk_surjective z i (zero_add i) |
| 58 | have he : Cochain.fromSingleEquiv (zero_add j) |
| 59 | (CochainComplex.HomComplex.δ i j |
| 60 | (Cochain.fromSingleMk f (zero_add i))) = f ≫ K.d i j := by |
| 61 | rw [Cochain.δ_fromSingleMk f (zero_add i) j j (zero_add j)] |
| 62 | simp |
| 63 | have hleft : (preadditiveCoyoneda.obj (.op X)).map (K.d i j) |
| 64 | (Cochain.fromSingleEquiv (zero_add i) |
| 65 | (Cochain.fromSingleMk f (zero_add i))) = f ≫ K.d i j := by |
| 66 | rw [Cochain.fromSingleEquiv_fromSingleMk] |
| 67 | rfl |
| 68 | have hcalc := hleft.trans he.symm |
| 69 | simp only [AddCommGrpCat.comp_apply, AddEquiv.toAddCommGrpIso_hom, |
| 70 | Functor.mapHomologicalComplex_obj_d] |
| 71 | convert hcalc using 1 <;> rfl) |
| 72 | |
| 73 | end HomComplex |
| 74 | end CochainComplex |
| 75 | |
| 76 | end |
| 77 | |
| 78 | end OAI.Algebra.Homology.HomComplexSingle |