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.Cochain |
| 2 | import Mathlib.Algebra.Homology.Single |
| 3 | |
| 4 | /-! # Single Zero -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Tensor.SingleZero |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Tensoring with a module in degree zero is the degreewise tensor functor. -/ |
| 11 | |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | set_option backward.isDefEq.respectTransparency.types false |
| 14 | |
| 15 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.CategoryTheory.MonoidalCategory |
| 16 | open scoped Classical |
| 17 | |
| 18 | variable (R : Type) [CommRing R] |
| 19 | |
| 20 | abbrev singleZero (M : ModuleCat.{0} R) : CochainComplex (ModuleCat.{0} R) ℤ := |
| 21 | (HomologicalComplex.single (ModuleCat.{0} R) (.up ℤ) 0).obj M |
| 22 | |
| 23 | local instance hasMapBifunctor (P Q : CochainComplex (ModuleCat.{0} R) ℤ) : |
| 24 | HomologicalComplex.HasMapBifunctor P Q (curriedTensor (ModuleCat.{0} R)) (.up ℤ) := by |
| 25 | intro n |
| 26 | infer_instance |
| 27 | |
| 28 | variable (M : ModuleCat.{0} R) (K : CochainComplex (ModuleCat.{0} R) ℤ) |
| 29 | |
| 30 | def termHom (n : ℤ) : ((Homotopy.complexFunctor R K).obj (singleZero R M)).X n ⟶ |
| 31 | (tensorLeft M).obj (K.X n) := |
| 32 | HomologicalComplex.mapBifunctorDesc (fun i j hij => |
| 33 | if hi : i = 0 then |
| 34 | ((curriedTensor (ModuleCat.{0} R)).map |
| 35 | (HomologicalComplex.singleObjXIsoOfEq (.up ℤ) 0 M i hi).hom).app (K.X j) ≫ |
| 36 | (tensorLeft M).map (K.XIsoOfEq (by change i + j = n at hij; omega)).hom |
| 37 | else 0) |
| 38 | |
| 39 | def termInv (n : ℤ) : (tensorLeft M).obj (K.X n) ⟶ |
| 40 | ((Homotopy.complexFunctor R K).obj (singleZero R M)).X n := |
| 41 | ((curriedTensor (ModuleCat.{0} R)).map (HomologicalComplex.singleObjXSelf (.up ℤ) 0 M).inv).app (K.X n) ≫ |
| 42 | HomologicalComplex.ιMapBifunctor (singleZero R M) K (curriedTensor (ModuleCat.{0} R)) (.up ℤ) |
| 43 | 0 n n (zero_add n) |
| 44 | |
| 45 | @[reassoc] |
| 46 | theorem ι_termHom (n : ℤ) : |
| 47 | HomologicalComplex.ιMapBifunctor (singleZero R M) K (curriedTensor (ModuleCat.{0} R)) (.up ℤ) |
| 48 | 0 n n (zero_add n) ≫ termHom R M K n = |
| 49 | ((curriedTensor (ModuleCat.{0} R)).map (HomologicalComplex.singleObjXSelf (.up ℤ) 0 M).hom).app (K.X n) := by |
| 50 | simp only [termHom, HomologicalComplex.ι_mapBifunctorDesc, dite_true, |
| 51 | HomologicalComplex.XIsoOfEq_rfl, Iso.refl_hom] |
| 52 | rw [(tensorLeft M).map_id, Category.comp_id] |
| 53 | rfl |
| 54 | |
| 55 | theorem termInv_termHom (n : ℤ) : termInv R M K n ≫ termHom R M K n = 𝟙 _ := by |
| 56 | rw [termInv, Category.assoc, ι_termHom, ← NatTrans.comp_app, ← CategoryTheory.Functor.map_comp, |
| 57 | Iso.inv_hom_id, CategoryTheory.Functor.map_id, NatTrans.id_app] |
| 58 | |
| 59 | theorem termHom_termInv (n : ℤ) : termHom R M K n ≫ termInv R M K n = 𝟙 _ := by |
| 60 | apply HomologicalComplex.mapBifunctor.hom_ext |
| 61 | intro i j hij |
| 62 | change i + j = n at hij |
| 63 | by_cases hi : i = 0 |
| 64 | · subst i |
| 65 | obtain rfl : j = n := by omega |
| 66 | rw [ι_termHom_assoc, termInv, ← NatTrans.comp_app_assoc, ← CategoryTheory.Functor.map_comp, |
| 67 | Iso.hom_inv_id, CategoryTheory.Functor.map_id, NatTrans.id_app, Category.id_comp] |
| 68 | exact (Category.comp_id _).symm |
| 69 | · have hz : IsZero (((curriedTensor (ModuleCat.{0} R)).obj ((singleZero R M).X i)).obj (K.X j)) := |
| 70 | (tensorRight (K.X j)).map_isZero (HomologicalComplex.isZero_single_obj_X (.up ℤ) 0 M i hi) |
| 71 | exact hz.eq_of_src _ _ |
| 72 | |
| 73 | def termIso (n : ℤ) : ((Homotopy.complexFunctor R K).obj (singleZero R M)).X n ≅ |
| 74 | (tensorLeft M).obj (K.X n) where |
| 75 | hom := termHom R M K n |
| 76 | inv := termInv R M K n |
| 77 | hom_inv_id := termHom_termInv R M K n |
| 78 | inv_hom_id := termInv_termHom R M K n |
| 79 | |
| 80 | theorem comm (n m : ℤ) (hnm : n + 1 = m) : |
| 81 | termHom R M K n ≫ (tensorLeft M).map (K.d n m) = |
| 82 | ((Homotopy.complexFunctor R K).obj (singleZero R M)).d n m ≫ termHom R M K m := by |
| 83 | subst m |
| 84 | apply HomologicalComplex.mapBifunctor.hom_ext |
| 85 | intro i j hij |
| 86 | change i + j = n at hij |
| 87 | by_cases hi : i = 0 |
| 88 | · subst i |
| 89 | have hj : j = n := by omega |
| 90 | subst j |
| 91 | rw [ι_termHom_assoc, |
| 92 | Cochain.ι_d_assoc R K n (n + 1) 0 n 1 (n + 1) rfl (zero_add n) rfl rfl] |
| 93 | simp only [HomologicalComplex.single_obj_d, CategoryTheory.Functor.map_zero, |
| 94 | NatTrans.app_zero, zero_comp, zero_add, Int.negOnePow_zero, one_smul, Category.assoc] |
| 95 | rw [ι_termHom] |
| 96 | exact (((curriedTensor (ModuleCat.{0} R)).map |
| 97 | (HomologicalComplex.singleObjXSelf (.up ℤ) 0 M).hom).naturality (K.d n (n + 1))).symm |
| 98 | · have hz : IsZero (((curriedTensor (ModuleCat.{0} R)).obj ((singleZero R M).X i)).obj (K.X j)) := |
| 99 | (tensorRight (K.X j)).map_isZero (HomologicalComplex.isZero_single_obj_X (.up ℤ) 0 M i hi) |
| 100 | exact hz.eq_of_src _ _ |
| 101 | |
| 102 | def iso : (Homotopy.complexFunctor R K).obj (singleZero R M) ≅ |
| 103 | ((tensorLeft M).mapHomologicalComplex (.up ℤ)).obj K := |
| 104 | HomologicalComplex.Hom.isoOfComponents (termIso R M K) (fun n m h => comm R M K n m h) |
| 105 | |
| 106 | end |
| 107 | |
| 108 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Tensor.SingleZero |