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.NumberTheory.PadicHodge.IntegralComparison.NonpositiveProjectiveResolution |
| 2 | import Mathlib.Algebra.Homology.Embedding.ExtendHomotopy |
| 3 | import Mathlib.Algebra.Homology.HomotopyCategory.MappingCone |
| 4 | |
| 5 | /-! # Nonpositive Cone Extension -/ |
| 6 | |
| 7 | namespace OAI.NumberTheory.PadicHodge.IntegralComparison.NonpositiveConeExtension |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! Extension from nonnegative chain degrees to nonpositive cochain |
| 12 | degrees preserves the actual homotopy cofiber, including its inclusions. -/ |
| 13 | |
| 14 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.HomologicalComplex |
| 15 | |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | set_option backward.isDefEq.respectTransparency.types false |
| 18 | set_option backward.defeqAttrib.useBackward true |
| 19 | |
| 20 | universe u v |
| 21 | |
| 22 | variable {C : Type u} [Category.{v} C] [Abelian C] |
| 23 | |
| 24 | abbrev shape := NonpositiveProjectiveResolution.shape |
| 25 | |
| 26 | theorem chain_predecessor (j : ℕ) : ∃ i, (ComplexShape.down ℕ).Rel i j := ⟨j + 1, rfl⟩ |
| 27 | |
| 28 | variable {F G : ChainComplex C ℕ} (φ : F ⟶ G) |
| 29 | |
| 30 | abbrev extendedMap := extendMap φ shape |
| 31 | |
| 32 | def inclusionHomotopy : Homotopy |
| 33 | (extendedMap φ ≫ extendMap (homotopyCofiber.inr φ) shape) 0 where |
| 34 | hom := ((homotopyCofiber.inrCompHomotopy φ chain_predecessor).extend shape).hom |
| 35 | zero := ((homotopyCofiber.inrCompHomotopy φ chain_predecessor).extend shape).zero |
| 36 | comm i := by |
| 37 | simpa only [extendMap_comp, extendMap_zero] using |
| 38 | ((homotopyCofiber.inrCompHomotopy φ chain_predecessor).extend shape).comm i |
| 39 | |
| 40 | def comparison : homotopyCofiber (extendedMap φ) ⟶ (homotopyCofiber φ).extend shape := |
| 41 | homotopyCofiber.desc (extendedMap φ) (extendMap (homotopyCofiber.inr φ) shape) |
| 42 | (inclusionHomotopy φ) |
| 43 | |
| 44 | theorem inr_comparison : homotopyCofiber.inr (extendedMap φ) ≫ comparison φ = |
| 45 | extendMap (homotopyCofiber.inr φ) shape := |
| 46 | homotopyCofiber.inr_desc _ _ _ |
| 47 | |
| 48 | theorem image_rel (n : ℕ) : (ComplexShape.up ℤ).Rel (shape.f (n + 1)) (shape.f n) := by |
| 49 | change (0 - ((n + 1 : ℕ) : ℤ)) + 1 = 0 - (n : ℤ) |
| 50 | omega |
| 51 | |
| 52 | def imageIso (n : ℕ) : |
| 53 | (homotopyCofiber (extendedMap φ)).X (shape.f (n + 1)) ≅ |
| 54 | ((homotopyCofiber φ).extend shape).X (shape.f (n + 1)) := |
| 55 | homotopyCofiber.XIsoBiprod (extendedMap φ) _ _ (image_rel n) ≪≫ |
| 56 | biprod.mapIso (F.extendXIso shape (i := n) rfl) (G.extendXIso shape (i := n + 1) rfl) ≪≫ |
| 57 | (homotopyCofiber.XIsoBiprod φ (n + 1) n rfl).symm ≪≫ |
| 58 | ((homotopyCofiber φ).extendXIso shape (i := n + 1) rfl).symm |
| 59 | |
| 60 | theorem comparison_image (n : ℕ) : (comparison φ).f (shape.f (n + 1)) = (imageIso φ n).hom := by |
| 61 | apply homotopyCofiber.ext_from_X (extendedMap φ) (shape.f n) (shape.f (n + 1)) (image_rel n) |
| 62 | · rw [comparison, homotopyCofiber.inlX_desc_f] |
| 63 | change ((homotopyCofiber.inrCompHomotopy φ chain_predecessor).extend shape).hom |
| 64 | (shape.f n) (shape.f (n + 1)) = _ |
| 65 | rw [Homotopy.extend_hom_eq _ shape rfl rfl, |
| 66 | homotopyCofiber.inrCompHomotopy_hom _ _ n (n + 1) rfl] |
| 67 | simp only [imageIso, Iso.trans_hom, Iso.symm_hom, |
| 68 | homotopyCofiber.inlX_XIsoBiprod_hom_assoc, biprod.mapIso_hom, biprod.inl_map_assoc, |
| 69 | homotopyCofiber.inl_XIsoBiprod_inv_assoc] |
| 70 | · rw [comparison, homotopyCofiber.inrX_desc_f] |
| 71 | rw [extendMap_f _ shape rfl] |
| 72 | simp only [imageIso, Iso.trans_hom, Iso.symm_hom, |
| 73 | homotopyCofiber.inrX_XIsoBiprod_hom_assoc, biprod.mapIso_hom, biprod.inr_map_assoc, |
| 74 | homotopyCofiber.inr_XIsoBiprod_inv_assoc, homotopyCofiber.inr_f] |
| 75 | |
| 76 | theorem isZero_positive (K : ChainComplex C ℕ) (i : ℤ) (hi : 0 < i) : |
| 77 | IsZero ((K.extend shape).X i) := |
| 78 | K.isZero_extend_X shape i (by intro n; change 0 - (n : ℤ) ≠ i; omega) |
| 79 | |
| 80 | theorem inr_isIso_of_zero_next {ι : Type*} {c : ComplexShape ι} |
| 81 | [DecidableRel c.Rel] {A B : HomologicalComplex C c} (a : A ⟶ B) (i : ι) |
| 82 | (hA : ∀ j, c.Rel i j → IsZero (A.X j)) : IsIso (homotopyCofiber.inrX a i) := by |
| 83 | refine ⟨⟨homotopyCofiber.sndX a i, homotopyCofiber.inrX_sndX a i, ?_⟩⟩ |
| 84 | by_cases hi : c.Rel i (c.next i) |
| 85 | · apply homotopyCofiber.ext_from_X a (c.next i) i hi |
| 86 | · exact (hA (c.next i) hi).eq_of_src _ _ |
| 87 | · simp only [homotopyCofiber.inrX_sndX_assoc, Category.comp_id] |
| 88 | · exact homotopyCofiber.sndX_inrX a i hi |
| 89 | |
| 90 | theorem comparison_zero_isIso : IsIso ((comparison φ).f (shape.f 0)) := by |
| 91 | have h0 : shape.f 0 = 0 := by simp [shape, NonpositiveProjectiveResolution.shape] |
| 92 | let : IsIso (homotopyCofiber.inrX (extendedMap φ) (shape.f 0)) := |
| 93 | inr_isIso_of_zero_next (extendedMap φ) _ (by |
| 94 | intro j hj |
| 95 | exact isZero_positive F j (by change shape.f 0 + 1 = j at hj; omega)) |
| 96 | let : IsIso (homotopyCofiber.inrX φ 0) := inr_isIso_of_zero_next φ 0 (by |
| 97 | intro j hj |
| 98 | have h : j + 1 = 0 := hj |
| 99 | omega) |
| 100 | have hα : IsIso ((extendMap (homotopyCofiber.inr φ) shape).f (shape.f 0)) := by |
| 101 | rw [extendMap_f _ shape rfl] |
| 102 | change IsIso ((G.extendXIso shape (i := 0) rfl).hom ≫ homotopyCofiber.inrX φ 0 ≫ |
| 103 | ((homotopyCofiber φ).extendXIso shape (i := 0) rfl).inv) |
| 104 | infer_instance |
| 105 | have hc : homotopyCofiber.inrX (extendedMap φ) (shape.f 0) ≫ (comparison φ).f (shape.f 0) = |
| 106 | (extendMap (homotopyCofiber.inr φ) shape).f (shape.f 0) := |
| 107 | homotopyCofiber.inrX_desc_f _ _ _ _ |
| 108 | have : IsIso (homotopyCofiber.inrX (extendedMap φ) (shape.f 0) ≫ |
| 109 | (comparison φ).f (shape.f 0)) := hc.symm ▸ hα |
| 110 | exact IsIso.of_isIso_comp_left (homotopyCofiber.inrX (extendedMap φ) (shape.f 0)) _ |
| 111 | |
| 112 | theorem comparison_component_isIso (i : ℤ) : IsIso ((comparison φ).f i) := by |
| 113 | by_cases hi : 0 < i |
| 114 | · apply (homotopyCofiber.isZero_X (extendedMap φ) i (isZero_positive G i hi) ?_).isIso |
| 115 | (isZero_positive (homotopyCofiber φ) i hi) |
| 116 | intro j hij |
| 117 | exact isZero_positive F j (by change i + 1 = j at hij; omega) |
| 118 | · let n := (-i).toNat |
| 119 | have hn : shape.f n = i := by |
| 120 | change 0 - (((-i).toNat : ℕ) : ℤ) = i |
| 121 | rw [Int.toNat_of_nonneg (by omega)] |
| 122 | omega |
| 123 | rw [← hn] |
| 124 | cases n with |
| 125 | | zero => exact comparison_zero_isIso φ |
| 126 | | succ n => rw [comparison_image]; infer_instance |
| 127 | |
| 128 | theorem comparison_isIso : IsIso (comparison φ) := by |
| 129 | let (i : ℤ) : IsIso ((comparison φ).f i) := comparison_component_isIso φ i |
| 130 | exact HomologicalComplex.Hom.isIso_of_components _ |
| 131 | |
| 132 | def iso : (homotopyCofiber φ).extend shape ≅ CochainComplex.mappingCone (extendedMap φ) := by |
| 133 | letI := comparison_isIso φ |
| 134 | exact (asIso (comparison φ)).symm |
| 135 | |
| 136 | end |
| 137 | |
| 138 | end OAI.NumberTheory.PadicHodge.IntegralComparison.NonpositiveConeExtension |