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