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.ModelCategory.Injective |
| 9 | import Mathlib.Algebra.Homology.Embedding.ExtendHomology |
| 10 | import Mathlib.Algebra.Homology.HomotopyCategory.Plus |
| 11 | |
| 12 | namespace OAI.Algebra.Homology.LiftToInjective |
| 13 | |
| 14 | open _root_.CochainComplex |
| 15 | |
| 16 | /-! |
| 17 | # Lifting along a monic quasi-isomorphism into a termwise-injective complex |
| 18 | |
| 19 | In an abelian category with enough injectives, a map from a bounded-below complex into a |
| 20 | bounded-below termwise-injective complex extends along a monic quasi-isomorphism. |
| 21 | -/ |
| 22 | |
| 23 | noncomputable section |
| 24 | |
| 25 | open _root_.CategoryTheory Limits HomotopicalAlgebra |
| 26 | open scoped _root_.CochainComplex.Plus.modelCategoryQuillen |
| 27 | |
| 28 | universe v u |
| 29 | |
| 30 | namespace CochainComplex |
| 31 | open _root_.CochainComplex |
| 32 | |
| 33 | variable {C : Type u} [Category.{v} C] [Abelian C] [EnoughInjectives C] |
| 34 | |
| 35 | section |
| 36 | |
| 37 | variable {A S I : CochainComplex C ℤ} |
| 38 | [A.IsStrictlyGE 0] [S.IsStrictlyGE 0] [I.IsStrictlyGE 0] |
| 39 | (a : A ⟶ S) [Mono a] [QuasiIso a] |
| 40 | (r : A ⟶ I) |
| 41 | |
| 42 | /-- In an abelian category with enough injectives, let `a : A → S` be a monomorphism and |
| 43 | quasi-isomorphism of integer-indexed complexes that are zero in negative degrees. Let `I` also |
| 44 | be zero in negative degrees and have injective terms. For a complex map `r : A → I`, this |
| 45 | chooses a complex map `l : S → I` with `l ∘ a = r`. -/ |
| 46 | def liftToInjective (hI : ∀ n : ℤ, Injective (I.X n)) : S ⟶ I := |
| 47 | let A' : Plus C := ⟨A, 0, inferInstance⟩ |
| 48 | let S' : Plus C := ⟨S, 0, inferInstance⟩ |
| 49 | let I' : Plus C := ⟨I, 0, inferInstance⟩ |
| 50 | let a' : A' ⟶ S' := ObjectProperty.homMk a |
| 51 | let r' : A' ⟶ I' := ObjectProperty.homMk r |
| 52 | let Z' := ⊤_ Plus C |
| 53 | let p : I' ⟶ Z' := terminal.from I' |
| 54 | let b : S' ⟶ Z' := terminal.from S' |
| 55 | let sq : CommSq r' a' p b := CommSq.mk (Subsingleton.elim _ _) |
| 56 | let : Mono a' := (Plus.mono_iff a').2 (inferInstance : Mono a) |
| 57 | let : WeakEquivalence a' := |
| 58 | (Plus.modelCategoryQuillen.weakEquivalence_iff a').2 (inferInstance : QuasiIso a) |
| 59 | let : IsFibrant I' := |
| 60 | (Plus.modelCategoryQuillen.isFibrant_iff I').2 hI |
| 61 | sq.lift.hom |
| 62 | |
| 63 | end |
| 64 | |
| 65 | end CochainComplex |
| 66 | |
| 67 | namespace CochainComplex |
| 68 | open _root_.CochainComplex |
| 69 | |
| 70 | variable {C : Type u} [Category.{v} C] [Abelian C] [EnoughInjectives C] |
| 71 | variable {A S I : CochainComplex C ℤ} |
| 72 | [A.IsStrictlyGE 0] [S.IsStrictlyGE 0] [I.IsStrictlyGE 0] |
| 73 | (a : A ⟶ S) [Mono a] [QuasiIso a] |
| 74 | (r : A ⟶ I) |
| 75 | |
| 76 | set_option backward.isDefEq.respectTransparency false in |
| 77 | omit [EnoughInjectives C] in |
| 78 | /-- The injective lift strictly extends the prescribed map. -/ |
| 79 | lemma comp_liftToInjective (hI : ∀ n : ℤ, Injective (I.X n)) : |
| 80 | a ≫ liftToInjective a r hI = r := by |
| 81 | let A' : Plus C := ⟨A, 0, inferInstance⟩ |
| 82 | let S' : Plus C := ⟨S, 0, inferInstance⟩ |
| 83 | let I' : Plus C := ⟨I, 0, inferInstance⟩ |
| 84 | let a' : A' ⟶ S' := ObjectProperty.homMk a |
| 85 | let r' : A' ⟶ I' := ObjectProperty.homMk r |
| 86 | let Z' := ⊤_ Plus C |
| 87 | let p : I' ⟶ Z' := terminal.from I' |
| 88 | let b : S' ⟶ Z' := terminal.from S' |
| 89 | let sq : CommSq r' a' p b := CommSq.mk (Subsingleton.elim _ _) |
| 90 | let : Mono a' := (Plus.mono_iff a').2 (inferInstance : Mono a) |
| 91 | let : WeakEquivalence a' := |
| 92 | (Plus.modelCategoryQuillen.weakEquivalence_iff a').2 (inferInstance : QuasiIso a) |
| 93 | let : IsFibrant I' := |
| 94 | (Plus.modelCategoryQuillen.isFibrant_iff I').2 hI |
| 95 | exact congrArg (fun f ↦ f.hom) sq.fac_left |
| 96 | |
| 97 | end CochainComplex |
| 98 | |
| 99 | namespace CochainComplex |
| 100 | open _root_.CochainComplex |
| 101 | |
| 102 | variable {C : Type*} [Category* C] [Abelian C] [EnoughInjectives C] |
| 103 | |
| 104 | omit [EnoughInjectives C] in |
| 105 | lemma injective_extend_nat (I : CochainComplex C ℕ) (hI : ∀ n, Injective (I.X n)) |
| 106 | (q : ℤ) : Injective ((I.extend ComplexShape.embeddingUpNat).X q) := by |
| 107 | by_cases hq : ∃ n : ℕ, (n : ℤ) = q |
| 108 | · obtain ⟨n, rfl⟩ := hq |
| 109 | exact Injective.of_iso (I.extendXIso ComplexShape.embeddingUpNat (i := n) rfl).symm (hI n) |
| 110 | · exact (I.isZero_extend_X ComplexShape.embeddingUpNat q (fun n hn => hq ⟨n, hn⟩)).injective |
| 111 | |
| 112 | omit [EnoughInjectives C] in |
| 113 | lemma mono_extendMap_nat {K L : CochainComplex C ℕ} (a : K ⟶ L) [Mono a] : |
| 114 | Mono (HomologicalComplex.extendMap a ComplexShape.embeddingUpNat) := by |
| 115 | apply HomologicalComplex.mono_of_mono_f |
| 116 | intro q |
| 117 | by_cases hq : ∃ n : ℕ, (n : ℤ) = q |
| 118 | · obtain ⟨n, rfl⟩ := hq |
| 119 | rw [HomologicalComplex.extendMap_f a ComplexShape.embeddingUpNat |
| 120 | (i := n) (i' := (n : ℤ)) rfl] |
| 121 | infer_instance |
| 122 | · exact (K.isZero_extend_X ComplexShape.embeddingUpNat q (fun n hn => hq ⟨n, hn⟩)).mono _ |
| 123 | |
| 124 | variable {A K I : CochainComplex C ℕ} (a : A ⟶ K) [Mono a] [QuasiIso a] |
| 125 | (r : A ⟶ I) (hI : ∀ n, Injective (I.X n)) |
| 126 | |
| 127 | /-- In an abelian category with enough injectives, let `a : A → K` be a monomorphism and |
| 128 | quasi-isomorphism of nonnegative cochain complexes, and let every term of `I` be injective. For |
| 129 | a map `r : A → I`, this chooses a map `l : K → I` satisfying `l ∘ a = r` as an equality of |
| 130 | complex maps. -/ |
| 131 | def liftToInjectiveNat : K ⟶ I := |
| 132 | letI := mono_extendMap_nat a |
| 133 | letI : CochainComplex.IsStrictlyGE (A.extend ComplexShape.embeddingUpNat) 0 := inferInstance |
| 134 | letI : CochainComplex.IsStrictlyGE (K.extend ComplexShape.embeddingUpNat) 0 := inferInstance |
| 135 | letI : CochainComplex.IsStrictlyGE (I.extend ComplexShape.embeddingUpNat) 0 := inferInstance |
| 136 | let f := liftToInjective |
| 137 | (A := A.extend ComplexShape.embeddingUpNat) |
| 138 | (S := K.extend ComplexShape.embeddingUpNat) |
| 139 | (I := I.extend ComplexShape.embeddingUpNat) |
| 140 | (HomologicalComplex.extendMap a ComplexShape.embeddingUpNat) |
| 141 | (HomologicalComplex.extendMap r ComplexShape.embeddingUpNat) |
| 142 | (injective_extend_nat I hI) |
| 143 | (ComplexShape.embeddingUpNat.extendFunctor C).preimage f |
| 144 | |
| 145 | end CochainComplex |
| 146 | |
| 147 | end |
| 148 | |
| 149 | end OAI.Algebra.Homology.LiftToInjective |