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.ShortComplex.PreservesHomology |
| 5 | |
| 6 | /-! # Countable Module Product -/ |
| 7 | |
| 8 | namespace OAI.NumberTheory.PadicHodge.IntegralComparison.CountableModuleProduct |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! |
| 13 | # IntegralComparison: countable products of coefficient modules are exact |
| 14 | -/ |
| 15 | |
| 16 | open _root_.CategoryTheory _root_.CategoryTheory.Limits |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | variable (R : Type u) [CommRing R] |
| 21 | |
| 22 | def functor : (Discrete ℕ ⥤ ModuleCat.{u} R) ⥤ ModuleCat.{u} R where |
| 23 | obj F := ModuleCat.of R (∀ n, F.obj ⟨n⟩) |
| 24 | map α := ModuleCat.ofHom |
| 25 | { toFun := fun x n => α.app ⟨n⟩ (x n) |
| 26 | map_add' := fun x y => funext (fun n => (α.app ⟨n⟩).hom.map_add (x n) (y n)) |
| 27 | map_smul' := fun r x => funext (fun n => (α.app ⟨n⟩).hom.map_smul r (x n)) } |
| 28 | map_id _F := ModuleCat.hom_ext (LinearMap.ext (fun _ => rfl)) |
| 29 | map_comp _α _β := ModuleCat.hom_ext (LinearMap.ext (fun _ => rfl)) |
| 30 | |
| 31 | instance additive : (functor R).Additive where |
| 32 | map_add := by intros; rfl |
| 33 | |
| 34 | def cone (F : Discrete ℕ ⥤ ModuleCat.{u} R) : Cone F where |
| 35 | pt := (functor R).obj F |
| 36 | π := Discrete.natTrans (fun n => ModuleCat.ofHom (LinearMap.proj n.as)) |
| 37 | |
| 38 | def isLimit (F : Discrete ℕ ⥤ ModuleCat.{u} R) : IsLimit (cone R F) where |
| 39 | lift s := ModuleCat.ofHom (LinearMap.pi (fun n => (s.π.app ⟨n⟩).hom)) |
| 40 | fac s n := ModuleCat.hom_ext (LinearMap.ext (fun _ => rfl)) |
| 41 | uniq s a ha := by |
| 42 | apply ModuleCat.hom_ext |
| 43 | apply LinearMap.ext |
| 44 | intro x |
| 45 | funext n |
| 46 | exact congrArg (fun g : s.pt ⟶ F.obj ⟨n⟩ => g x) (ha ⟨n⟩) |
| 47 | |
| 48 | def componentIso (F : Discrete ℕ ⥤ ModuleCat.{u} R) : limit F ≅ (functor R).obj F := |
| 49 | limit.isoLimitCone ⟨cone R F, isLimit R F⟩ |
| 50 | |
| 51 | theorem componentIso_projection (F : Discrete ℕ ⥤ ModuleCat.{u} R) (n : ℕ) : |
| 52 | (componentIso R F).hom ≫ ModuleCat.ofHom (LinearMap.proj n) = limit.π F ⟨n⟩ := |
| 53 | limit.isoLimitCone_hom_π ⟨cone R F, isLimit R F⟩ ⟨n⟩ |
| 54 | |
| 55 | def iso : lim (J := Discrete ℕ) (C := ModuleCat.{u} R) ≅ functor R := |
| 56 | NatIso.ofComponents (componentIso R) (by |
| 57 | intro F G α |
| 58 | apply ModuleCat.hom_ext |
| 59 | apply LinearMap.ext |
| 60 | intro x |
| 61 | funext n |
| 62 | have h₁ := congrArg (fun g : limit G ⟶ G.obj ⟨n⟩ => g ((lim.map α) x)) (componentIso_projection R G n) |
| 63 | have h₂ := congrArg (fun g : limit F ⟶ F.obj ⟨n⟩ => α.app ⟨n⟩ (g x)) (componentIso_projection R F n) |
| 64 | have h := congrArg (fun g : limit F ⟶ G.obj ⟨n⟩ => g x) (limMap_π α ⟨n⟩) |
| 65 | exact h₁.trans (h.trans h₂.symm)) |
| 66 | |
| 67 | instance preservesFiniteLimits : PreservesFiniteLimits (functor R) := |
| 68 | preservesFiniteLimits_of_natIso (iso R) |
| 69 | |
| 70 | instance preservesFiniteColimits : PreservesFiniteColimits (functor R) := |
| 71 | preservesFiniteColimits_of_natIso (iso R) |
| 72 | |
| 73 | instance preservesHomology : (functor R).PreservesHomology := by infer_instance |
| 74 | |
| 75 | def projection (n : ℕ) : functor R ⟶ (evaluation (Discrete ℕ) (ModuleCat.{u} R)).obj ⟨n⟩ where |
| 76 | app _F := ModuleCat.ofHom (LinearMap.proj n) |
| 77 | naturality _ _ _ := ModuleCat.hom_ext (LinearMap.ext (fun _ => rfl)) |
| 78 | |
| 79 | end |
| 80 | |
| 81 | end OAI.NumberTheory.PadicHodge.IntegralComparison.CountableModuleProduct |