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 |
| 2 | |
| 3 | /-! # Flatten Torsion Factors -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.PELModuli.CMPoints.FlattenTorsionFactors |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | section |
| 10 | |
| 11 | /-! Finite products of group-valued functors and their natural characters. -/ |
| 12 | |
| 13 | open _root_.CategoryTheory _root_.AlgebraicGeometry |
| 14 | open scoped Classical |
| 15 | |
| 16 | variable {C : Type*} [Category* C] {I : Type} [Fintype I] |
| 17 | |
| 18 | local instance forgottenCommGroup (K : C ⥤ CommGrpCat) (T : C) : |
| 19 | CommGroup ((K ⋙ forget₂ CommGrpCat GrpCat).obj T) := |
| 20 | inferInstanceAs (CommGroup (K.obj T)) |
| 21 | |
| 22 | def piGroupFunctor (F : I → C ⥤ CommGrpCat) : C ⥤ GrpCat where |
| 23 | obj T := GrpCat.of (∀ i, (F i).obj T) |
| 24 | map f := GrpCat.ofHom (MonoidHom.piMap (fun i => ((F i).map f).hom)) |
| 25 | map_id T := by |
| 26 | apply GrpCat.hom_ext |
| 27 | apply MonoidHom.ext |
| 28 | intro x |
| 29 | funext i |
| 30 | exact (F i).map_id_apply T (x i) |
| 31 | map_comp f h := by |
| 32 | apply GrpCat.hom_ext |
| 33 | apply MonoidHom.ext |
| 34 | intro x |
| 35 | funext i |
| 36 | exact (F i).map_comp_apply f h (x i) |
| 37 | |
| 38 | def piGroupInclusion (F : I → C ⥤ CommGrpCat) (i : I) : F i ⋙ forget₂ CommGrpCat GrpCat ⟶ piGroupFunctor F where |
| 39 | app T := GrpCat.ofHom (MonoidHom.mulSingle (fun j => (F j).obj T) i) |
| 40 | naturality T U f := by |
| 41 | apply GrpCat.hom_ext |
| 42 | apply MonoidHom.ext |
| 43 | intro x |
| 44 | funext j |
| 45 | change (Pi.mulSingle i ((F i).map f x) : ∀ j, (F j).obj U) j = |
| 46 | (F j).map f ((Pi.mulSingle i x : ∀ j, (F j).obj T) j) |
| 47 | by_cases hj : j = i |
| 48 | · subst j |
| 49 | simp |
| 50 | · simp [Pi.mulSingle_eq_of_ne hj] |
| 51 | |
| 52 | def piGroupCharacterAssemble (F : I → C ⥤ CommGrpCat) (K : C ⥤ CommGrpCat) |
| 53 | (χ : ∀ i, F i ⋙ forget₂ CommGrpCat GrpCat ⟶ K ⋙ forget₂ CommGrpCat GrpCat) : |
| 54 | piGroupFunctor F ⟶ K ⋙ forget₂ CommGrpCat GrpCat where |
| 55 | app T := GrpCat.ofHom { |
| 56 | toFun x := ∏ i, (χ i).app T (x i) |
| 57 | map_one' := by simp |
| 58 | map_mul' x y := by simp only [Pi.mul_apply, map_mul, Finset.prod_mul_distrib] } |
| 59 | naturality T U f := by |
| 60 | ext x |
| 61 | change (∏ i, (χ i).app U ((F i).map f (x i))) = (K.map f) (∏ i, (χ i).app T (x i)) |
| 62 | rw [map_prod] |
| 63 | exact Finset.prod_congr rfl (fun i _ => (χ i).naturality_apply f (x i)) |
| 64 | |
| 65 | def piGroupCharactersEquiv (F : I → C ⥤ CommGrpCat) (K : C ⥤ CommGrpCat) : |
| 66 | (piGroupFunctor F ⟶ K ⋙ forget₂ CommGrpCat GrpCat) ≃ |
| 67 | (∀ i, F i ⋙ forget₂ CommGrpCat GrpCat ⟶ K ⋙ forget₂ CommGrpCat GrpCat) where |
| 68 | toFun χ i := piGroupInclusion F i ≫ χ |
| 69 | invFun := piGroupCharacterAssemble F K |
| 70 | left_inv χ := by |
| 71 | ext T x |
| 72 | change (∏ i, χ.app T (Pi.mulSingle i (x i))) = χ.app T x |
| 73 | let h : (∀ i, (F i).obj T) →* K.obj T := (χ.app T).hom |
| 74 | exact (map_prod h (fun i => Pi.mulSingle i (x i)) Finset.univ).symm.trans |
| 75 | (congrArg h (Finset.univ_prod_mulSingle (show ∀ i, (F i).obj T from x))) |
| 76 | right_inv χ := by |
| 77 | funext i |
| 78 | ext T x |
| 79 | change (∏ j, (χ j).app T ((Pi.mulSingle i x : ∀ j, (F j).obj T) j)) = (χ i).app T x |
| 80 | rw [Finset.prod_eq_single i] |
| 81 | · simp |
| 82 | · intro j _ hj |
| 83 | simp [Pi.mulSingle_eq_of_ne hj] |
| 84 | · simp |
| 85 | |
| 86 | end |
| 87 | |
| 88 | /-! Assemble factorwise torsion decompositions into one actual natural |
| 89 | product decomposition, with the pairs of indices retained. -/ |
| 90 | |
| 91 | open _root_.CategoryTheory |
| 92 | |
| 93 | variable {C : Type*} [Category* C] {I J : Type} [Fintype I] [Fintype J] |
| 94 | |
| 95 | def flattenPiGroupIso (F : I → C ⥤ CommGrpCat) (G : I → J → C ⥤ CommGrpCat) |
| 96 | (e : ∀ i, F i ⋙ forget₂ CommGrpCat GrpCat ≅ piGroupFunctor (G i)) : |
| 97 | piGroupFunctor F ≅ piGroupFunctor (fun p : I × J => G p.1 p.2) := |
| 98 | NatIso.ofComponents (fun T => MulEquiv.toGrpIso { |
| 99 | toFun x p := (e p.1).hom.app T (x p.1) p.2 |
| 100 | invFun y i := (e i).inv.app T (fun j => y (i, j)) |
| 101 | left_inv x := by |
| 102 | funext i |
| 103 | exact ConcreteCategory.congr_hom ((e i).app T).hom_inv_id (x i) |
| 104 | right_inv y := by |
| 105 | funext p |
| 106 | exact congrFun (ConcreteCategory.congr_hom ((e p.1).app T).inv_hom_id |
| 107 | (fun j => y (p.1, j))) p.2 |
| 108 | map_mul' x y := by |
| 109 | funext p |
| 110 | exact congrFun (map_mul ((e p.1).hom.app T).hom (x p.1) (y p.1)) p.2 }) (by |
| 111 | intro T U a |
| 112 | apply GrpCat.hom_ext |
| 113 | apply MonoidHom.ext |
| 114 | intro x |
| 115 | funext p |
| 116 | exact congrFun ((e p.1).hom.naturality_apply a (x p.1)) p.2) |
| 117 | |
| 118 | end |
| 119 | |
| 120 | end OAI.AlgebraicGeometry.PELModuli.CMPoints.FlattenTorsionFactors |