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 OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Tensor.SingleZero |
| 2 | import Mathlib.Algebra.Homology.HomotopyCategory.SingleFunctors |
| 3 | import Mathlib.Algebra.Homology.HomotopyCategory.ShiftSequence |
| 4 | import Mathlib.RingTheory.Flat.CategoryTheory |
| 5 | |
| 6 | /-! # Tensor Single -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Tensor.TensorSingle |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | section |
| 13 | |
| 14 | /-! Tensoring with a module concentrated in any degree, and the homology |
| 15 | of this tensor when the module is flat. -/ |
| 16 | |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | set_option backward.isDefEq.respectTransparency.types false |
| 19 | |
| 20 | open _root_.CategoryTheory _root_.CategoryTheory.MonoidalCategory |
| 21 | |
| 22 | variable (R : Type) [CommRing R] (M : ModuleCat.{0} R) |
| 23 | (K : CochainComplex (ModuleCat.{0} R) ℤ) (d : ℤ) |
| 24 | |
| 25 | def iso : |
| 26 | (Homotopy.complexFunctor R K).obj ((CochainComplex.singleFunctor (ModuleCat.{0} R) d).obj M) ≅ |
| 27 | (((tensorLeft M).mapHomologicalComplex (.up ℤ)).obj K)⟦-d⟧ := |
| 28 | (Homotopy.complexFunctor R K).mapIso |
| 29 | (((CochainComplex.singleFunctors (ModuleCat.{0} R)).shiftIso (-d) d 0 (neg_add_cancel d)).symm.app M) ≪≫ |
| 30 | ((Homotopy.complexFunctor R K).commShiftIso (-d)).app _ ≪≫ |
| 31 | (CategoryTheory.shiftFunctor _ (-d)).mapIso (SingleZero.iso R M K) |
| 32 | |
| 33 | def homologyIso (n : ℤ) : |
| 34 | ((Homotopy.complexFunctor R K).obj |
| 35 | ((CochainComplex.singleFunctor (ModuleCat.{0} R) d).obj M)).homology n ≅ |
| 36 | (((tensorLeft M).mapHomologicalComplex (.up ℤ)).obj K).homology (n - d) := |
| 37 | HomologicalComplex.homologyMapIso (iso R M K d) n ≪≫ |
| 38 | (CochainComplex.ShiftSequence.shiftIso (ModuleCat.{0} R) (-d) n (n - d) (by omega)).app _ |
| 39 | |
| 40 | def flatHomologyIso [Module.Flat R M] (n : ℤ) : |
| 41 | ((Homotopy.complexFunctor R K).obj |
| 42 | ((CochainComplex.singleFunctor (ModuleCat.{0} R) d).obj M)).homology n ≅ |
| 43 | (tensorLeft M).obj (K.homology (n - d)) := |
| 44 | homologyIso R M K d n ≪≫ (K.sc (n - d)).mapHomologyIso (tensorLeft M) |
| 45 | |
| 46 | end |
| 47 | |
| 48 | /-! Naturality in the module of the tensor comparison for a single complex. -/ |
| 49 | |
| 50 | set_option backward.isDefEq.respectTransparency false |
| 51 | set_option backward.isDefEq.respectTransparency.types false |
| 52 | |
| 53 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.CategoryTheory.MonoidalCategory |
| 54 | |
| 55 | namespace Naturality |
| 56 | |
| 57 | variable (R : Type) [CommRing R] (K : CochainComplex (ModuleCat.{0} R) ℤ) |
| 58 | {M N : ModuleCat.{0} R} (f : M ⟶ N) |
| 59 | |
| 60 | local instance hasMapBifunctor (P Q : CochainComplex (ModuleCat.{0} R) ℤ) : |
| 61 | HomologicalComplex.HasMapBifunctor P Q (curriedTensor (ModuleCat.{0} R)) (.up ℤ) := by |
| 62 | intro n |
| 63 | infer_instance |
| 64 | |
| 65 | theorem naturality : |
| 66 | (Homotopy.complexFunctor R K).map |
| 67 | ((HomologicalComplex.single (ModuleCat.{0} R) (.up ℤ) 0).map f) ≫ |
| 68 | (SingleZero.iso R N K).hom = |
| 69 | (SingleZero.iso R M K).hom ≫ |
| 70 | (NatTrans.mapHomologicalComplex ((curriedTensor (ModuleCat.{0} R)).map f) (.up ℤ)).app K := by |
| 71 | apply HomologicalComplex.Hom.ext |
| 72 | funext n |
| 73 | change (HomologicalComplex.mapBifunctorMap |
| 74 | ((HomologicalComplex.single (ModuleCat.{0} R) (.up ℤ) 0).map f) (𝟙 K) |
| 75 | (curriedTensor (ModuleCat.{0} R)) (.up ℤ)).f n ≫ SingleZero.termHom R N K n = |
| 76 | SingleZero.termHom R M K n ≫ ((curriedTensor (ModuleCat.{0} R)).map f).app (K.X n) |
| 77 | apply HomologicalComplex.mapBifunctor.hom_ext |
| 78 | intro i j hij |
| 79 | change i + j = n at hij |
| 80 | by_cases hi : i = 0 |
| 81 | · subst i |
| 82 | have hj : j = n := by omega |
| 83 | subst j |
| 84 | rw [HomologicalComplex.ι_mapBifunctorMap_assoc] |
| 85 | simp only [HomologicalComplex.id_f] |
| 86 | rw [((curriedTensor (ModuleCat.{0} R)).obj ((SingleZero.singleZero R N).X 0)).map_id, |
| 87 | Category.id_comp, SingleZero.ι_termHom, SingleZero.ι_termHom_assoc, |
| 88 | HomologicalComplex.single_map_f_self] |
| 89 | rw [CategoryTheory.Functor.map_comp, CategoryTheory.Functor.map_comp, |
| 90 | NatTrans.comp_app, NatTrans.comp_app] |
| 91 | simp only [Category.assoc] |
| 92 | rw [← NatTrans.comp_app, ← CategoryTheory.Functor.map_comp, Iso.inv_hom_id, |
| 93 | CategoryTheory.Functor.map_id, NatTrans.id_app, Category.comp_id] |
| 94 | · have hz : IsZero (((curriedTensor (ModuleCat.{0} R)).obj |
| 95 | ((SingleZero.singleZero R M).X i)).obj (K.X j)) := |
| 96 | (tensorRight (K.X j)).map_isZero (HomologicalComplex.isZero_single_obj_X (.up ℤ) 0 M i hi) |
| 97 | exact hz.eq_of_src _ _ |
| 98 | |
| 99 | def flatHomologyIso (M : ModuleCat.{0} R) [Module.Flat R M] (n : ℤ) : |
| 100 | ((Homotopy.complexFunctor R K).obj (SingleZero.singleZero R M)).homology n ≅ |
| 101 | (tensorLeft M).obj (K.homology n) := |
| 102 | HomologicalComplex.homologyMapIso (SingleZero.iso R M K) n ≪≫ |
| 103 | (K.sc n).mapHomologyIso (tensorLeft M) |
| 104 | |
| 105 | theorem flatHomologyIso_naturality [Module.Flat R M] [Module.Flat R N] (n : ℤ) : |
| 106 | HomologicalComplex.homologyMap ((Homotopy.complexFunctor R K).map |
| 107 | ((HomologicalComplex.single (ModuleCat.{0} R) (.up ℤ) 0).map f)) n ≫ |
| 108 | (flatHomologyIso R K N n).hom = |
| 109 | (flatHomologyIso R K M n).hom ≫ |
| 110 | ((curriedTensor (ModuleCat.{0} R)).map f).app (K.homology n) := by |
| 111 | have h := congrArg (fun g => HomologicalComplex.homologyMap g n) (Naturality.naturality R K f) |
| 112 | rw [HomologicalComplex.homologyMap_comp, HomologicalComplex.homologyMap_comp] at h |
| 113 | simp only [flatHomologyIso, Iso.trans_hom, HomologicalComplex.homologyMapIso_hom] |
| 114 | rw [← Category.assoc, h, Category.assoc] |
| 115 | simp only [Category.assoc] |
| 116 | congr 1 |
| 117 | change ShortComplex.homologyMap ((K.sc n).mapNatTrans ((curriedTensor (ModuleCat.{0} R)).map f)) ≫ |
| 118 | ((K.sc n).mapHomologyIso (tensorLeft N)).hom = |
| 119 | ((K.sc n).mapHomologyIso (tensorLeft M)).hom ≫ |
| 120 | ((curriedTensor (ModuleCat.{0} R)).map f).app (K.sc n).homology |
| 121 | rw [ShortComplex.homologyMap_mapNatTrans] |
| 122 | simp only [Category.assoc, Iso.inv_hom_id, Category.comp_id] |
| 123 | |
| 124 | def moduleFunctor : ModuleCat.{0} R ⥤ CochainComplex (ModuleCat.{0} R) ℤ where |
| 125 | obj M := ((tensorLeft M).mapHomologicalComplex (.up ℤ)).obj K |
| 126 | map f := (NatTrans.mapHomologicalComplex ((curriedTensor (ModuleCat.{0} R)).map f) (.up ℤ)).app K |
| 127 | map_id M := by |
| 128 | rw [CategoryTheory.Functor.map_id, NatTrans.mapHomologicalComplex_id, NatTrans.id_app] |
| 129 | map_comp f g := by |
| 130 | rw [CategoryTheory.Functor.map_comp, NatTrans.mapHomologicalComplex_comp, NatTrans.comp_app] |
| 131 | |
| 132 | def zeroNatIso : |
| 133 | HomologicalComplex.single (ModuleCat.{0} R) (.up ℤ) 0 ⋙ Homotopy.complexFunctor R K ≅ |
| 134 | moduleFunctor R K := |
| 135 | NatIso.ofComponents (fun M => SingleZero.iso R M K) (fun f => Naturality.naturality R K f) |
| 136 | |
| 137 | def degreeNatIso (d : ℤ) : |
| 138 | CochainComplex.singleFunctor (ModuleCat.{0} R) d ⋙ Homotopy.complexFunctor R K ≅ |
| 139 | moduleFunctor R K ⋙ CategoryTheory.shiftFunctor _ (-d) := |
| 140 | CategoryTheory.Functor.isoWhiskerRight |
| 141 | ((CochainComplex.singleFunctors (ModuleCat.{0} R)).shiftIso (-d) d 0 (neg_add_cancel d)).symm _ ≪≫ |
| 142 | CategoryTheory.Functor.associator _ _ _ ≪≫ |
| 143 | CategoryTheory.Functor.isoWhiskerLeft (CochainComplex.singleFunctor (ModuleCat.{0} R) 0) |
| 144 | ((Homotopy.complexFunctor R K).commShiftIso (-d)) ≪≫ |
| 145 | (CategoryTheory.Functor.associator _ _ _).symm ≪≫ |
| 146 | CategoryTheory.Functor.isoWhiskerRight (zeroNatIso R K) _ |
| 147 | |
| 148 | theorem degreeNatIso_app (d : ℤ) (M : ModuleCat.{0} R) : |
| 149 | (degreeNatIso R K d).app M = iso R M K d := by |
| 150 | apply Iso.ext |
| 151 | simp [degreeNatIso, zeroNatIso, iso] |
| 152 | |
| 153 | theorem degree_naturality (d : ℤ) : |
| 154 | (Homotopy.complexFunctor R K).map ((CochainComplex.singleFunctor (ModuleCat.{0} R) d).map f) ≫ |
| 155 | (iso R N K d).hom = |
| 156 | (iso R M K d).hom ≫ |
| 157 | ((NatTrans.mapHomologicalComplex ((curriedTensor (ModuleCat.{0} R)).map f) (.up ℤ)).app K)⟦-d⟧' := by |
| 158 | have h := (degreeNatIso R K d).hom.naturality f |
| 159 | change _ ≫ ((degreeNatIso R K d).app N).hom = ((degreeNatIso R K d).app M).hom ≫ _ at h |
| 160 | rw [degreeNatIso_app, degreeNatIso_app] at h |
| 161 | exact h |
| 162 | |
| 163 | theorem homology_naturality (d n : ℤ) : |
| 164 | HomologicalComplex.homologyMap ((Homotopy.complexFunctor R K).map |
| 165 | ((CochainComplex.singleFunctor (ModuleCat.{0} R) d).map f)) n ≫ |
| 166 | (homologyIso R N K d n).hom = |
| 167 | (homologyIso R M K d n).hom ≫ HomologicalComplex.homologyMap |
| 168 | ((NatTrans.mapHomologicalComplex ((curriedTensor (ModuleCat.{0} R)).map f) (.up ℤ)).app K) (n - d) := by |
| 169 | have h := congrArg (fun g => HomologicalComplex.homologyMap g n) (degree_naturality R K f d) |
| 170 | rw [HomologicalComplex.homologyMap_comp, HomologicalComplex.homologyMap_comp] at h |
| 171 | have hs := (CochainComplex.ShiftSequence.shiftIso (ModuleCat.{0} R) (-d) n (n - d) (by omega)).hom.naturality |
| 172 | ((NatTrans.mapHomologicalComplex ((curriedTensor (ModuleCat.{0} R)).map f) (.up ℤ)).app K) |
| 173 | simp only [homologyIso, Iso.trans_hom, HomologicalComplex.homologyMapIso_hom] |
| 174 | rw [← Category.assoc, h, Category.assoc] |
| 175 | simp only [Category.assoc] |
| 176 | congr 1 |
| 177 | |
| 178 | theorem flat_degree_naturality [Module.Flat R M] [Module.Flat R N] (d n : ℤ) : |
| 179 | HomologicalComplex.homologyMap ((Homotopy.complexFunctor R K).map |
| 180 | ((CochainComplex.singleFunctor (ModuleCat.{0} R) d).map f)) n ≫ |
| 181 | (TensorSingle.flatHomologyIso R N K d n).hom = |
| 182 | (TensorSingle.flatHomologyIso R M K d n).hom ≫ |
| 183 | ((curriedTensor (ModuleCat.{0} R)).map f).app (K.homology (n - d)) := by |
| 184 | simp only [TensorSingle.flatHomologyIso, Iso.trans_hom] |
| 185 | rw [← Category.assoc, homology_naturality, Category.assoc] |
| 186 | simp only [Category.assoc] |
| 187 | congr 1 |
| 188 | change ShortComplex.homologyMap ((K.sc (n - d)).mapNatTrans ((curriedTensor (ModuleCat.{0} R)).map f)) ≫ |
| 189 | ((K.sc (n - d)).mapHomologyIso (tensorLeft N)).hom = |
| 190 | ((K.sc (n - d)).mapHomologyIso (tensorLeft M)).hom ≫ |
| 191 | ((curriedTensor (ModuleCat.{0} R)).map f).app (K.sc (n - d)).homology |
| 192 | rw [ShortComplex.homologyMap_mapNatTrans] |
| 193 | simp only [Category.assoc, Iso.inv_hom_id, Category.comp_id] |
| 194 | |
| 195 | end Naturality |
| 196 | |
| 197 | end |
| 198 | |
| 199 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Tensor.TensorSingle |