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 | import Mathlib.Algebra.Category.ModuleCat.AB |
| 2 | import Mathlib.Algebra.Category.ModuleCat.Products |
| 3 | import Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.Basic |
| 4 | import Mathlib.Algebra.Homology.HomologicalComplexAbelian |
| 5 | import Mathlib.Algebra.Homology.Functor |
| 6 | import Mathlib.CategoryTheory.Adjunction.Additive |
| 7 | import Mathlib.CategoryTheory.Sites.SheafCohomology.Cech |
| 8 | import OAI.NumberTheory.PadicHodge.IntegralComparison.QuasiIsoFunctorIso |
| 9 | |
| 10 | /-! # Formal Coproduct Quasi Iso -/ |
| 11 | |
| 12 | namespace OAI.NumberTheory.PadicHodge.IntegralComparison.FormalCoproductQuasiIso |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | /-! Evaluation on a genuine formal coproduct preserves quasi-isomorphisms |
| 17 | which are quasi-isomorphisms on all its summands. -/ |
| 18 | |
| 19 | open _root_.CategoryTheory _root_.CategoryTheory.Limits Opposite |
| 20 | |
| 21 | universe u v s t |
| 22 | |
| 23 | variable (R : Type u) [CommRing R] |
| 24 | |
| 25 | local instance limits : HasLimitsOfSize.{v, v} (ModuleCat.{max u v} R) := |
| 26 | ModuleCat.hasLimitsOfSize.{v, v, max u v, u} |
| 27 | |
| 28 | local instance exactLimits (ι : Type v) : |
| 29 | HasExactLimitsOfShape (Discrete ι) (ModuleCat.{max u v} R) := by |
| 30 | let : AB4StarOfSize.{v} AddCommGrpCat.{max u v} := AB4StarOfSize_shrink _ |
| 31 | exact HasExactLimitsOfShape.domain_of_functor (Discrete ι) |
| 32 | (forget₂ (ModuleCat.{max u v} R) AddCommGrpCat.{max u v}) |
| 33 | |
| 34 | abbrev product (ι : Type v) : |
| 35 | (Discrete ι ⥤ ModuleCat.{max u v} R) ⥤ ModuleCat.{max u v} R := lim |
| 36 | |
| 37 | local instance constAdditive (ι : Type v) : |
| 38 | (Functor.const (Discrete ι) : ModuleCat.{max u v} R ⥤ |
| 39 | Discrete ι ⥤ ModuleCat.{max u v} R).Additive where |
| 40 | map_add := by intros; rfl |
| 41 | |
| 42 | instance product_additive (ι : Type v) : (product R ι).Additive := |
| 43 | (constLimAdj (J := Discrete ι) (C := ModuleCat.{max u v} R)).right_adjoint_additive |
| 44 | |
| 45 | instance product_preservesHomology (ι : Type v) : (product R ι).PreservesHomology := by |
| 46 | dsimp only [product] |
| 47 | infer_instance |
| 48 | |
| 49 | theorem product_quasiIso (ι : Type v) |
| 50 | {K L : CochainComplex (Discrete ι ⥤ ModuleCat.{max u v} R) ℕ} (f : K ⟶ L) |
| 51 | (hf : ∀ i : Discrete ι, QuasiIso |
| 52 | ((((evaluation (Discrete ι) (ModuleCat.{max u v} R)).obj i).mapHomologicalComplex (.up ℕ)).map f)) : |
| 53 | QuasiIso (((product R ι).mapHomologicalComplex (.up ℕ)).map f) := by |
| 54 | let : QuasiIso f := (HomologicalComplex.quasiIso_iff_evaluation f).mpr hf |
| 55 | infer_instance |
| 56 | |
| 57 | variable {C : Type s} [Category.{t} C] (E : FormalCoproduct.{v} C) |
| 58 | |
| 59 | def indices : Discrete E.I ⥤ Cᵒᵖ := Discrete.functor (fun i => op (E.obj i)) |
| 60 | |
| 61 | def evaluation : (Cᵒᵖ ⥤ ModuleCat.{max u v} R) ⥤ ModuleCat.{max u v} R := |
| 62 | FormalCoproduct.evalOp C (ModuleCat.{max u v} R) ⋙ |
| 63 | (CategoryTheory.evaluation (FormalCoproduct.{v} C)ᵒᵖ (ModuleCat.{max u v} R)).obj (op E) |
| 64 | |
| 65 | def productEvaluation : (Cᵒᵖ ⥤ ModuleCat.{max u v} R) ⥤ ModuleCat.{max u v} R := |
| 66 | (Functor.whiskeringLeft _ _ (ModuleCat.{max u v} R)).obj (indices E) ⋙ product R E.I |
| 67 | |
| 68 | def diagramIso (P : Cᵒᵖ ⥤ ModuleCat.{max u v} R) : |
| 69 | Discrete.functor (fun i => P.obj (op (E.obj i))) ≅ indices E ⋙ P := |
| 70 | Discrete.natIso (fun _ => Iso.refl _) |
| 71 | |
| 72 | def componentIso (P : Cᵒᵖ ⥤ ModuleCat.{max u v} R) : |
| 73 | (FormalCoproductQuasiIso.evaluation R E).obj P ≅ (productEvaluation R E).obj P := |
| 74 | HasLimit.isoOfNatIso (diagramIso R E P) |
| 75 | |
| 76 | theorem component_pi (P : Cᵒᵖ ⥤ ModuleCat.{max u v} R) (i : Discrete E.I) : |
| 77 | (componentIso R E P).hom ≫ limit.π (indices E ⋙ P) i = |
| 78 | Limits.Pi.π (fun i => P.obj (op (E.obj i))) i.as := |
| 79 | (HasLimit.isoOfNatIso_hom_π (diagramIso R E P) i).trans (Category.comp_id _) |
| 80 | |
| 81 | def evaluationIso : FormalCoproductQuasiIso.evaluation R E ≅ productEvaluation R E := |
| 82 | NatIso.ofComponents (fun P => componentIso R E P) (by |
| 83 | intro F G f |
| 84 | apply limit.hom_ext |
| 85 | intro i |
| 86 | change (Limits.Pi.map (fun i => f.app (op (E.obj i))) ≫ |
| 87 | (componentIso R E G).hom) ≫ limit.π (indices E ⋙ G) i = |
| 88 | ((componentIso R E F).hom ≫ |
| 89 | lim.map (Functor.whiskerLeft (indices E) f)) ≫ limit.π (indices E ⋙ G) i |
| 90 | let φ := Limits.Pi.map (fun i => f.app (op (E.obj i))) |
| 91 | have hg := component_pi R E G i |
| 92 | have hf := component_pi R E F i |
| 93 | have hl := limMap_π (Functor.whiskerLeft (indices E) f) i |
| 94 | exact (Category.assoc _ _ _).trans |
| 95 | ((congrArg (fun t => φ ≫ t) hg).trans |
| 96 | ((Limits.Pi.map_π _ i.as).trans |
| 97 | ((congrArg (fun t => t ≫ f.app (op (E.obj i.as))) hf).symm.trans |
| 98 | ((Category.assoc _ _ _).trans |
| 99 | ((congrArg (fun t => (componentIso R E F).hom ≫ t) hl).symm.trans |
| 100 | (Category.assoc _ _ _).symm)))))) |
| 101 | |
| 102 | instance evaluation_additive : (FormalCoproductQuasiIso.evaluation R E).Additive where |
| 103 | map_add {F G} f g := by |
| 104 | apply Limits.Pi.hom_ext |
| 105 | intro i |
| 106 | simp only [FormalCoproductQuasiIso.evaluation, Functor.comp_map] |
| 107 | change Limits.Pi.map (fun i => (f + g).app (op (E.obj i))) ≫ _ = |
| 108 | (Limits.Pi.map (fun i => f.app (op (E.obj i))) + |
| 109 | Limits.Pi.map (fun i => g.app (op (E.obj i)))) ≫ _ |
| 110 | simp [Preadditive.add_comp, Preadditive.comp_add] |
| 111 | |
| 112 | instance productEvaluation_additive : (productEvaluation R E).Additive := by |
| 113 | dsimp only [productEvaluation] |
| 114 | infer_instance |
| 115 | |
| 116 | theorem quasiIso {K L : CochainComplex (Cᵒᵖ ⥤ ModuleCat.{max u v} R) ℕ} (f : K ⟶ L) |
| 117 | (hf : ∀ i : E.I, QuasiIso |
| 118 | ((((CategoryTheory.evaluation Cᵒᵖ (ModuleCat.{max u v} R)).obj |
| 119 | (op (E.obj i))).mapHomologicalComplex (.up ℕ)).map f)) : |
| 120 | QuasiIso (((FormalCoproductQuasiIso.evaluation R E).mapHomologicalComplex (.up ℕ)).map f) := by |
| 121 | let F := (Functor.whiskeringLeft (Discrete E.I) Cᵒᵖ |
| 122 | (ModuleCat.{max u v} R)).obj (indices E) |
| 123 | let : QuasiIso (((productEvaluation R E).mapHomologicalComplex (.up ℕ)).map f) := |
| 124 | product_quasiIso R E.I ((F.mapHomologicalComplex (.up ℕ)).map f) (fun i => hf i.as) |
| 125 | exact QuasiIsoFunctorIso.transport _ _ |
| 126 | (NatIso.mapHomologicalComplex (evaluationIso R E).symm (.up ℕ)) f |
| 127 | |
| 128 | end |
| 129 | |
| 130 | end OAI.NumberTheory.PadicHodge.IntegralComparison.FormalCoproductQuasiIso |