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.DerivedCategory.RightDerivedFunctorPlus |
| 7 | import Mathlib.CategoryTheory.Shift.Localization |
| 8 | |
| 9 | /-! # Derived Functor Plus Shift -/ |
| 10 | |
| 11 | namespace OAI.Algebra.Homology.DerivedFunctorPlusShift |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open _root_.CategoryTheory |
| 16 | open _root_.CategoryTheory.Functor |
| 17 | open _root_.HomotopyCategory |
| 18 | open _root_.HomotopyCategory.Plus |
| 19 | |
| 20 | /-! |
| 21 | # Coherent shifts on bounded-below right derived functors |
| 22 | |
| 23 | The bounded-below homotopy category of injective objects is equivalent to the |
| 24 | bounded-below derived category. The right-derived unit becomes an isomorphism |
| 25 | on this category. The coherent shifts descend through this equivalence, using |
| 26 | Mathlib's localization construction. Boundedness is explicit in all source and target |
| 27 | categories. |
| 28 | -/ |
| 29 | |
| 30 | namespace HomotopyCategory.Plus |
| 31 | |
| 32 | variable (C : Type*) [Category* C] [Abelian C] [HasDerivedCategory C] |
| 33 | |
| 34 | /-- The bounded-below homotopy category of injective objects maps to the |
| 35 | bounded-below derived category. -/ |
| 36 | def injectiveToDerived : |
| 37 | HomotopyCategory.Plus (InjectiveObject C) ⥤ DerivedCategory.Plus C := |
| 38 | (InjectiveObject.ι C).mapHomotopyCategoryPlus ⋙ DerivedCategory.Plus.Qh |
| 39 | |
| 40 | instance : (injectiveToDerived C).CommShift ℤ := |
| 41 | inferInstanceAs |
| 42 | (((InjectiveObject.ι C).mapHomotopyCategoryPlus ⋙ |
| 43 | DerivedCategory.Plus.Qh).CommShift ℤ) |
| 44 | |
| 45 | set_option backward.defeqAttrib.useBackward true in |
| 46 | set_option backward.isDefEq.respectTransparency false in |
| 47 | lemma injectiveToDerived_map_bijective |
| 48 | (K L : HomotopyCategory.Plus (InjectiveObject C)) : |
| 49 | Function.Bijective ((injectiveToDerived C).map : (K ⟶ L) → _) := by |
| 50 | let incl := (InjectiveObject.ι C).mapHomotopyCategoryPlus |
| 51 | have hL : CochainComplex.IsKInjective (incl.obj L).obj.as := by |
| 52 | obtain ⟨n, hn⟩ : CochainComplex.plus C (incl.obj L).obj.as := by |
| 53 | have h := (incl.obj L).property |
| 54 | rwa [← HomotopyCategory.plus_quotient_obj_iff] |
| 55 | exact CochainComplex.isKInjective_of_injective _ n |
| 56 | exact (DerivedCategory.Plus.Qh_map_bijective_of_isKInjective |
| 57 | (incl.obj K) (incl.obj L) hL).comp ⟨incl.map_injective, incl.map_surjective⟩ |
| 58 | |
| 59 | instance : (injectiveToDerived C).Full where |
| 60 | map_surjective := (injectiveToDerived_map_bijective C _ _).surjective |
| 61 | |
| 62 | instance : (injectiveToDerived C).Faithful where |
| 63 | map_injective {K L} {_f _g} h := (injectiveToDerived_map_bijective C K L).injective h |
| 64 | |
| 65 | variable [EnoughInjectives C] |
| 66 | |
| 67 | instance : (injectiveToDerived C).EssSurj := by |
| 68 | dsimp only [injectiveToDerived] |
| 69 | infer_instance |
| 70 | |
| 71 | instance : (injectiveToDerived C).IsEquivalence := { } |
| 72 | |
| 73 | instance : (injectiveToDerived C).IsLocalization |
| 74 | (MorphismProperty.isomorphisms (HomotopyCategory.Plus (InjectiveObject C))) := |
| 75 | Functor.IsLocalization.of_isEquivalence _ _ (by rfl) |
| 76 | |
| 77 | omit [HasDerivedCategory C] in |
| 78 | /-- Natural transformations into a functor that inverts quasi-isomorphisms are determined by |
| 79 | their values on bounded-below injective complexes. -/ |
| 80 | lemma natTrans_ext_on_injectives {H : Type*} [Category* H] |
| 81 | {F G : HomotopyCategory.Plus C ⥤ H} |
| 82 | (hG : (HomotopyCategory.Plus.quasiIso C).IsInvertedBy G) |
| 83 | {α β : F ⟶ G} |
| 84 | (h : ∀ K : HomotopyCategory.Plus (InjectiveObject C), |
| 85 | α.app ((InjectiveObject.ι C).mapHomotopyCategoryPlus.obj K) = |
| 86 | β.app ((InjectiveObject.ι C).mapHomotopyCategoryPlus.obj K)) : α = β := by |
| 87 | ext K : 2 |
| 88 | let r := Classical.arbitrary ((HomotopyCategory.Plus.localizerMorphism C).RightResolution K) |
| 89 | have : IsIso (G.map r.w) := hG r.w r.hw |
| 90 | rw [← cancel_mono (G.map r.w), ← α.naturality, ← β.naturality, h] |
| 91 | |
| 92 | end HomotopyCategory.Plus |
| 93 | |
| 94 | namespace CategoryTheory.Functor |
| 95 | |
| 96 | variable {C D : Type*} [Category* C] [Category* D] [Abelian C] [Abelian D] |
| 97 | [HasDerivedCategory C] [HasDerivedCategory D] [EnoughInjectives C] |
| 98 | (F : C ⥤ D) [F.Additive] |
| 99 | |
| 100 | /-- Termwise application of `F` to bounded-below injective complexes, followed |
| 101 | by passage to the derived category. -/ |
| 102 | def rightDerivedFunctorPlusOnInjectives : |
| 103 | HomotopyCategory.Plus (InjectiveObject C) ⥤ DerivedCategory.Plus D := |
| 104 | (InjectiveObject.ι C).mapHomotopyCategoryPlus ⋙ |
| 105 | F.mapHomotopyCategoryPlus ⋙ DerivedCategory.Plus.Qh |
| 106 | |
| 107 | instance : (rightDerivedFunctorPlusOnInjectives F).CommShift ℤ := |
| 108 | inferInstanceAs |
| 109 | (((InjectiveObject.ι C).mapHomotopyCategoryPlus ⋙ |
| 110 | F.mapHomotopyCategoryPlus ⋙ DerivedCategory.Plus.Qh).CommShift ℤ) |
| 111 | |
| 112 | /-- The right-derived unit restricted to injective complexes. -/ |
| 113 | def rightDerivedFunctorPlusOnInjectivesUnit : |
| 114 | (rightDerivedFunctorPlusOnInjectives F) ⟶ |
| 115 | DerivedFunctorPlusShift.HomotopyCategory.Plus.injectiveToDerived C ⋙ F.rightDerivedFunctorPlus := |
| 116 | whiskerLeft (InjectiveObject.ι C).mapHomotopyCategoryPlus |
| 117 | F.rightDerivedFunctorPlusUnith ≫ |
| 118 | (Functor.associator _ _ _).inv |
| 119 | |
| 120 | set_option backward.defeqAttrib.useBackward true in |
| 121 | set_option backward.isDefEq.respectTransparency false in |
| 122 | instance : IsIso (rightDerivedFunctorPlusOnInjectivesUnit F) := by |
| 123 | have h (K : HomotopyCategory.Plus (InjectiveObject C)) : |
| 124 | IsIso (F.rightDerivedFunctorPlusUnith.app |
| 125 | ((InjectiveObject.ι C).mapHomotopyCategoryPlus.obj K)) := |
| 126 | (HomotopyCategory.Plus.localizerMorphism_derives |
| 127 | (F.mapHomotopyCategoryPlus ⋙ DerivedCategory.Plus.Qh)).isIso_of_isRightDerivedFunctor |
| 128 | F.rightDerivedFunctorPlusUnith K |
| 129 | let _ : ∀ K, IsIso ((rightDerivedFunctorPlusOnInjectivesUnit F).app K) := fun K => by |
| 130 | simpa only [rightDerivedFunctorPlusOnInjectivesUnit, NatTrans.comp_app, |
| 131 | whiskerLeft_app, Functor.associator_inv_app, Category.comp_id] using h K |
| 132 | exact NatIso.isIso_of_isIso_app _ |
| 133 | |
| 134 | /-- The canonical injective-resolution comparison. -/ |
| 135 | def rightDerivedFunctorPlusOnInjectivesIso : |
| 136 | DerivedFunctorPlusShift.HomotopyCategory.Plus.injectiveToDerived C ⋙ F.rightDerivedFunctorPlus ≅ |
| 137 | (rightDerivedFunctorPlusOnInjectives F) := |
| 138 | (asIso (rightDerivedFunctorPlusOnInjectivesUnit F)).symm |
| 139 | |
| 140 | instance rightDerivedFunctorPlusInjectiveLifting : |
| 141 | Localization.Lifting (DerivedFunctorPlusShift.HomotopyCategory.Plus.injectiveToDerived C) |
| 142 | (MorphismProperty.isomorphisms (HomotopyCategory.Plus (InjectiveObject C))) |
| 143 | (rightDerivedFunctorPlusOnInjectives F) F.rightDerivedFunctorPlus := |
| 144 | ⟨(rightDerivedFunctorPlusOnInjectivesIso F)⟩ |
| 145 | |
| 146 | /-- Coherent shift compatibility of the bounded-below right derived |
| 147 | functor. Its zero and addition coherence laws are inherited by localization |
| 148 | from the termwise complex-level shift compatibility. -/ |
| 149 | instance rightDerivedFunctorPlusCommShift : F.rightDerivedFunctorPlus.CommShift ℤ := |
| 150 | Functor.commShiftOfLocalization (DerivedFunctorPlusShift.HomotopyCategory.Plus.injectiveToDerived C) |
| 151 | (MorphismProperty.isomorphisms (HomotopyCategory.Plus (InjectiveObject C))) ℤ |
| 152 | (rightDerivedFunctorPlusOnInjectives F) F.rightDerivedFunctorPlus |
| 153 | |
| 154 | /-- The injective-resolution comparison is compatible with the coherent shifts, which pins it to |
| 155 | the derived unit. -/ |
| 156 | instance rightDerivedFunctorPlusOnInjectivesIso_commShift : |
| 157 | NatTrans.CommShift (rightDerivedFunctorPlusOnInjectivesIso F).hom ℤ := |
| 158 | NatTrans.commShift_iso_hom_of_localization |
| 159 | (DerivedFunctorPlusShift.HomotopyCategory.Plus.injectiveToDerived C) |
| 160 | (MorphismProperty.isomorphisms (HomotopyCategory.Plus (InjectiveObject C))) ℤ |
| 161 | (rightDerivedFunctorPlusOnInjectives F) F.rightDerivedFunctorPlus |
| 162 | |
| 163 | set_option backward.defeqAttrib.useBackward true in |
| 164 | set_option backward.isDefEq.respectTransparency false in |
| 165 | /-- Compatibility with the derived unit after restriction to injective complexes. -/ |
| 166 | instance rightDerivedFunctorPlusUnit_whiskerLeft_injectives_commShift : |
| 167 | NatTrans.CommShift (whiskerLeft (InjectiveObject.ι C).mapHomotopyCategoryPlus |
| 168 | F.rightDerivedFunctorPlusUnith) ℤ := by |
| 169 | have : NatTrans.CommShift (rightDerivedFunctorPlusOnInjectivesUnit F) ℤ := |
| 170 | inferInstanceAs (NatTrans.CommShift (rightDerivedFunctorPlusOnInjectivesIso F).inv ℤ) |
| 171 | have h : (rightDerivedFunctorPlusOnInjectivesUnit F) ≫ (Functor.associator _ _ _).hom = |
| 172 | whiskerLeft (InjectiveObject.ι C).mapHomotopyCategoryPlus |
| 173 | F.rightDerivedFunctorPlusUnith := by |
| 174 | simp [rightDerivedFunctorPlusOnInjectivesUnit] |
| 175 | rw [← h] |
| 176 | infer_instance |
| 177 | |
| 178 | set_option backward.defeqAttrib.useBackward true in |
| 179 | set_option backward.isDefEq.respectTransparency false in |
| 180 | /-- The full right-derived unit commutes with the coherent shifts, |
| 181 | including on complexes which are not termwise injective. -/ |
| 182 | instance rightDerivedFunctorPlusUnitCommShift : |
| 183 | NatTrans.CommShift F.rightDerivedFunctorPlusUnith ℤ where |
| 184 | shift_comm a := by |
| 185 | apply DerivedFunctorPlusShift.HomotopyCategory.Plus.natTrans_ext_on_injectives C |
| 186 | · intro K L f hf |
| 187 | have : IsIso (DerivedCategory.Plus.Qh.map f) := |
| 188 | Localization.inverts DerivedCategory.Plus.Qh |
| 189 | (HomotopyCategory.Plus.quasiIso C) f hf |
| 190 | change IsIso ((shiftFunctor (DerivedCategory.Plus D) a).map |
| 191 | (F.rightDerivedFunctorPlus.map (DerivedCategory.Plus.Qh.map f))) |
| 192 | infer_instance |
| 193 | · intro K |
| 194 | let incl := (InjectiveObject.ι C).mapHomotopyCategoryPlus |
| 195 | have h := NatTrans.shift_app_comm |
| 196 | (whiskerLeft incl F.rightDerivedFunctorPlusUnith) a K |
| 197 | simp only [Functor.commShiftIso_comp_hom_app, whiskerLeft_app, Category.assoc] at h |
| 198 | rw [← F.rightDerivedFunctorPlusUnith.naturality_assoc] at h |
| 199 | apply (cancel_epi ((F.mapHomotopyCategoryPlus ⋙ DerivedCategory.Plus.Qh).map |
| 200 | ((incl.commShiftIso a).hom.app K))).1 |
| 201 | simpa only [NatTrans.comp_app, whiskerRight_app, whiskerLeft_app, |
| 202 | Functor.commShiftIso_comp_hom_app, Category.assoc] using h |
| 203 | |
| 204 | end CategoryTheory.Functor |
| 205 | |
| 206 | end |
| 207 | |
| 208 | end OAI.Algebra.Homology.DerivedFunctorPlusShift |