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.Homology.Embedding.ExtendHomology |
| 2 | import Mathlib.Algebra.Homology.Embedding.Restriction |
| 3 | import Mathlib.Algebra.Homology.HomologicalComplexAbelian |
| 4 | |
| 5 | /-! # Supported Restriction -/ |
| 6 | |
| 7 | namespace OAI.NumberTheory.PadicHodge.IntegralComparison.Supported.SupportedRestriction |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! Restricting a complex to a shape containing its support preserves |
| 12 | its actual homology and quasi-isomorphisms. -/ |
| 13 | |
| 14 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.HomologicalComplex |
| 15 | |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | universe u v |
| 19 | |
| 20 | variable {C : Type u} [Category.{v} C] [Abelian C] |
| 21 | {ι ι' : Type*} {c : ComplexShape ι} {c' : ComplexShape ι'} |
| 22 | (e : c.Embedding c') [e.IsRelIff] |
| 23 | (K : HomologicalComplex C c') [K.IsStrictlySupported e] |
| 24 | |
| 25 | def componentIso (j : ι') : ((K.restriction e).extend e).X j ≅ K.X j := by |
| 26 | classical |
| 27 | by_cases hj : ∃ i, e.f i = j |
| 28 | · exact (K.restriction e).extendXIso e hj.choose_spec ≪≫ K.restrictionXIso e hj.choose_spec |
| 29 | · exact ((K.restriction e).isZero_extend_X e j (by simpa using hj)).iso |
| 30 | (K.isZero_X_of_isStrictlySupported e j (by simpa using hj)) |
| 31 | |
| 32 | theorem componentIso_image (i : ι) (j : ι') (h : e.f i = j) : |
| 33 | componentIso e K j = (K.restriction e).extendXIso e h ≪≫ K.restrictionXIso e h := by |
| 34 | classical |
| 35 | have hj : ∃ k, e.f k = j := ⟨i, h⟩ |
| 36 | have haux (a b : ι) (ha : e.f a = j) (hb : e.f b = j) : |
| 37 | (K.restriction e).extendXIso e ha ≪≫ K.restrictionXIso e ha = |
| 38 | (K.restriction e).extendXIso e hb ≪≫ K.restrictionXIso e hb := by |
| 39 | have hab : a = b := e.injective_f (ha.trans hb.symm) |
| 40 | subst b |
| 41 | rfl |
| 42 | simp only [componentIso, dite_eq_left hj] |
| 43 | exact haux _ _ _ _ |
| 44 | |
| 45 | def extensionIso : (K.restriction e).extend e ≅ K := |
| 46 | Hom.isoOfComponents (componentIso e K) (by |
| 47 | intro i j hij |
| 48 | by_cases hi : ∃ a, e.f a = i |
| 49 | · obtain ⟨a, ha⟩ := hi |
| 50 | by_cases hj : ∃ b, e.f b = j |
| 51 | · obtain ⟨b, hb⟩ := hj |
| 52 | rw [componentIso_image e K a i ha, componentIso_image e K b j hb, |
| 53 | extend_d_eq _ e ha hb, restriction_d_eq _ e ha hb] |
| 54 | simp only [Iso.trans_hom, Category.assoc, Iso.inv_hom_id_assoc, |
| 55 | Iso.inv_hom_id, Category.comp_id] |
| 56 | · exact (K.isZero_X_of_isStrictlySupported e j (by simpa using hj)).eq_of_tgt _ _ |
| 57 | · exact ((K.restriction e).isZero_extend_X e i (by simpa using hi)).eq_of_src _ _) |
| 58 | |
| 59 | theorem extensionIso_natural {L : HomologicalComplex C c'} [L.IsStrictlySupported e] |
| 60 | (f : K ⟶ L) : |
| 61 | extendMap (restrictionMap f e) e ≫ (extensionIso e L).hom = (extensionIso e K).hom ≫ f := by |
| 62 | ext j |
| 63 | by_cases hj : ∃ i, e.f i = j |
| 64 | · obtain ⟨i, hi⟩ := hj |
| 65 | change (extendMap (restrictionMap f e) e).f j ≫ (componentIso e L j).hom = |
| 66 | (componentIso e K j).hom ≫ f.f j |
| 67 | rw [componentIso_image e K i j hi, componentIso_image e L i j hi, |
| 68 | extendMap_f _ e hi, restrictionMap_f' _ e hi] |
| 69 | simp only [Iso.trans_hom, Category.assoc, Iso.inv_hom_id_assoc, |
| 70 | Iso.inv_hom_id, Category.comp_id] |
| 71 | · exact ((K.restriction e).isZero_extend_X e j (by simpa using hj)).eq_of_src _ _ |
| 72 | |
| 73 | def homologyIso (i : ι) : (K.restriction e).homology i ≅ K.homology (e.f i) := |
| 74 | ((K.restriction e).extendHomologyIso e rfl).symm ≪≫ |
| 75 | HomologicalComplex.homologyMapIso (extensionIso e K) (e.f i) |
| 76 | |
| 77 | theorem quasiIso {L : HomologicalComplex C c'} [L.IsStrictlySupported e] |
| 78 | (f : K ⟶ L) [QuasiIso f] : QuasiIso (restrictionMap f e) := by |
| 79 | have : QuasiIso (extendMap (restrictionMap f e) e ≫ (extensionIso e L).hom) := by |
| 80 | rw [extensionIso_natural] |
| 81 | infer_instance |
| 82 | have : QuasiIso (extendMap (restrictionMap f e) e) := |
| 83 | quasiIso_of_comp_right _ (extensionIso e L).hom |
| 84 | exact (quasiIso_extendMap_iff _ e).mp this |
| 85 | |
| 86 | end |
| 87 | |
| 88 | end OAI.NumberTheory.PadicHodge.IntegralComparison.Supported.SupportedRestriction |