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 | /- |
| 2 | Derived from AINTLIB: |
| 3 | projects/ModularCurves/ModularCurves/ForMathlib/TotalComplexUpNatHorizontalEdgeHOne.lean |
| 4 | The upstream AINTLIB repository is licensed under Apache 2.0. |
| 5 | This file has been modified. |
| 6 | -/ |
| 7 | import Mathlib.Algebra.Homology.ConcreteCategory |
| 8 | import Mathlib.Algebra.Homology.QuasiIso |
| 9 | |
| 10 | /-! # Positive Cycle Homology -/ |
| 11 | |
| 12 | namespace OAI.AlgebraicGeometry.SheafCohomology.Cech.PositiveCycleHomology.Projective.CycleHomology |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | open _root_.CategoryTheory _root_.CategoryTheory.Limits |
| 17 | |
| 18 | universe u |
| 19 | variable (n : ℕ) |
| 20 | |
| 21 | theorem up_prev_succ : (ComplexShape.up ℕ).prev (n + 1) = n := |
| 22 | (ComplexShape.up ℕ).prev_eq' (show (ComplexShape.up ℕ).Rel n (n + 1) by rfl) |
| 23 | |
| 24 | theorem up_next_succ : (ComplexShape.up ℕ).next (n + 1) = n + 2 := |
| 25 | (ComplexShape.up ℕ).next_eq' (show (ComplexShape.up ℕ).Rel (n + 1) (n + 2) by rfl) |
| 26 | |
| 27 | noncomputable def abCyclesMk |
| 28 | (L : CochainComplex AddCommGrpCat.{u} ℕ) (x : L.X (n + 1)) |
| 29 | (hx : L.d (n + 1) (n + 2) x = 0) : L.cycles (n + 1) := |
| 30 | (L.cyclesIsoSc' n (n + 1) (n + 2) (up_prev_succ n) (up_next_succ n)).inv |
| 31 | ((L.sc' n (n + 1) (n + 2)).abCyclesIso.inv ⟨x, hx⟩) |
| 32 | |
| 33 | @[simp] |
| 34 | theorem i_abCyclesMk |
| 35 | (L : CochainComplex AddCommGrpCat.{u} ℕ) (x : L.X (n + 1)) |
| 36 | (hx : L.d (n + 1) (n + 2) x = 0) : |
| 37 | L.iCycles (n + 1) (abCyclesMk n L x hx) = x := by |
| 38 | have h₁ := congrArg |
| 39 | (fun g ↦ g ((L.sc' n (n + 1) (n + 2)).abCyclesIso.inv ⟨x, hx⟩)) |
| 40 | (L.cyclesIsoSc'_inv_iCycles n (n + 1) (n + 2) (up_prev_succ n) (up_next_succ n)) |
| 41 | simp only [ConcreteCategory.comp_apply] at h₁ |
| 42 | have h₂ := (L.sc' n (n + 1) (n + 2)).abCyclesIso_inv_apply_iCycles ⟨x, hx⟩ |
| 43 | exact h₁.trans h₂ |
| 44 | |
| 45 | theorem cyclesMap_cyclesMk |
| 46 | {L M : CochainComplex AddCommGrpCat.{u} ℕ} (f : L ⟶ M) |
| 47 | (x : L.X (n + 1)) (hx : L.d (n + 1) (n + 2) x = 0) |
| 48 | (hfx : M.d (n + 1) (n + 2) (f.f (n + 1) x) = 0) : |
| 49 | HomologicalComplex.cyclesMap f (n + 1) (abCyclesMk n L x hx) = |
| 50 | abCyclesMk n M (f.f (n + 1) x) hfx := by |
| 51 | apply (AddCommGrpCat.mono_iff_injective (M.iCycles (n + 1))).mp inferInstance |
| 52 | have h := congrArg (fun g ↦ g (abCyclesMk n L x hx)) |
| 53 | (HomologicalComplex.cyclesMap_i f (n + 1)) |
| 54 | simpa only [ConcreteCategory.comp_apply, i_abCyclesMk n] using h |
| 55 | |
| 56 | theorem homologyπ_cyclesMk_eq_of_sub_eq_boundary |
| 57 | (L : CochainComplex AddCommGrpCat.{u} ℕ) |
| 58 | (x y : L.X (n + 1)) (hx : L.d (n + 1) (n + 2) x = 0) (hy : L.d (n + 1) (n + 2) y = 0) |
| 59 | (b : L.X n) (hxy : x - y = L.d n (n + 1) b) : |
| 60 | L.homologyπ (n + 1) (abCyclesMk n L x hx) = |
| 61 | L.homologyπ (n + 1) (abCyclesMk n L y hy) := by |
| 62 | let S := L.sc' n (n + 1) (n + 2) |
| 63 | let cIso := L.cyclesIsoSc' n (n + 1) (n + 2) (up_prev_succ n) (up_next_succ n) |
| 64 | let hIso := L.homologyIsoSc' n (n + 1) (n + 2) (up_prev_succ n) (up_next_succ n) |
| 65 | let qIso := hIso ≪≫ S.abHomologyIso |
| 66 | apply (AddCommGrpCat.mono_iff_injective qIso.hom).mp inferInstance |
| 67 | have class_eq (z : L.X (n + 1)) (hz : L.d (n + 1) (n + 2) z = 0) : |
| 68 | qIso.hom (L.homologyπ (n + 1) (abCyclesMk n L z hz)) = |
| 69 | QuotientAddGroup.mk' (AddMonoidHom.range S.abToCycles) |
| 70 | (⟨z, hz⟩ : AddMonoidHom.ker S.g.hom) := by |
| 71 | have h₁ := congrArg (fun g ↦ g (abCyclesMk n L z hz)) |
| 72 | (L.π_homologyIsoSc'_hom n (n + 1) (n + 2) (up_prev_succ n) (up_next_succ n)) |
| 73 | have h₂ := congrArg |
| 74 | (fun g ↦ g (cIso.hom (abCyclesMk n L z hz))) |
| 75 | S.abLeftHomologyData.homologyπ_comp_homologyIso_hom |
| 76 | simp only [ConcreteCategory.comp_apply] at h₁ h₂ |
| 77 | calc |
| 78 | _ = S.abHomologyIso.hom |
| 79 | (hIso.hom (L.homologyπ (n + 1) (abCyclesMk n L z hz))) := rfl |
| 80 | _ = S.abHomologyIso.hom |
| 81 | (S.homologyπ (cIso.hom (abCyclesMk n L z hz))) := by |
| 82 | rw [h₁] |
| 83 | _ = QuotientAddGroup.mk' (AddMonoidHom.range S.abToCycles) |
| 84 | (S.abCyclesIso.hom (cIso.hom (abCyclesMk n L z hz))) := by |
| 85 | change S.abLeftHomologyData.homologyIso.hom |
| 86 | (S.homologyπ (cIso.hom (abCyclesMk n L z hz))) = |
| 87 | S.abLeftHomologyData.π |
| 88 | (S.abLeftHomologyData.cyclesIso.hom |
| 89 | (cIso.hom (abCyclesMk n L z hz))) |
| 90 | exact h₂ |
| 91 | _ = QuotientAddGroup.mk' (AddMonoidHom.range S.abToCycles) |
| 92 | (⟨z, hz⟩ : AddMonoidHom.ker S.g.hom) := by |
| 93 | change QuotientAddGroup.mk' (AddMonoidHom.range S.abToCycles) |
| 94 | (S.abCyclesIso.hom |
| 95 | (cIso.hom (cIso.inv (S.abCyclesIso.inv ⟨z, hz⟩)))) = _ |
| 96 | rw [cIso.inv_hom_id_apply, S.abCyclesIso.inv_hom_id_apply] |
| 97 | rw [class_eq x hx, class_eq y hy] |
| 98 | dsimp only [S] |
| 99 | refine (QuotientAddGroup.eq_iff_sub_mem).2 ?_ |
| 100 | rw [AddMonoidHom.mem_range] |
| 101 | refine ⟨b, ?_⟩ |
| 102 | apply Subtype.ext |
| 103 | change L.d n (n + 1) b = x - y |
| 104 | exact hxy.symm |
| 105 | |
| 106 | theorem exists_boundary_of_homologyπ_abCyclesMk_eq_zero |
| 107 | (L : CochainComplex AddCommGrpCat.{u} ℕ) |
| 108 | (x : L.X (n + 1)) (hx : L.d (n + 1) (n + 2) x = 0) |
| 109 | (hzero : L.homologyπ (n + 1) (abCyclesMk n L x hx) = 0) : |
| 110 | ∃ b : L.X n, L.d n (n + 1) b = x := by |
| 111 | let S := L.sc' n (n + 1) (n + 2) |
| 112 | let cIso := L.cyclesIsoSc' n (n + 1) (n + 2) (up_prev_succ n) (up_next_succ n) |
| 113 | let hIso := L.homologyIsoSc' n (n + 1) (n + 2) (up_prev_succ n) (up_next_succ n) |
| 114 | let qIso := hIso ≪≫ S.abHomologyIso |
| 115 | have class_eq : |
| 116 | qIso.hom (L.homologyπ (n + 1) (abCyclesMk n L x hx)) = |
| 117 | QuotientAddGroup.mk' (AddMonoidHom.range S.abToCycles) |
| 118 | (⟨x, hx⟩ : AddMonoidHom.ker S.g.hom) := by |
| 119 | have h₁ := congrArg (fun g ↦ g (abCyclesMk n L x hx)) |
| 120 | (L.π_homologyIsoSc'_hom n (n + 1) (n + 2) (up_prev_succ n) (up_next_succ n)) |
| 121 | have h₂ := congrArg |
| 122 | (fun g ↦ g (cIso.hom (abCyclesMk n L x hx))) |
| 123 | S.abLeftHomologyData.homologyπ_comp_homologyIso_hom |
| 124 | simp only [ConcreteCategory.comp_apply] at h₁ h₂ |
| 125 | calc |
| 126 | _ = S.abHomologyIso.hom |
| 127 | (hIso.hom (L.homologyπ (n + 1) (abCyclesMk n L x hx))) := rfl |
| 128 | _ = S.abHomologyIso.hom |
| 129 | (S.homologyπ (cIso.hom (abCyclesMk n L x hx))) := by rw [h₁] |
| 130 | _ = QuotientAddGroup.mk' (AddMonoidHom.range S.abToCycles) |
| 131 | (S.abCyclesIso.hom (cIso.hom (abCyclesMk n L x hx))) := by |
| 132 | change S.abLeftHomologyData.homologyIso.hom |
| 133 | (S.homologyπ (cIso.hom (abCyclesMk n L x hx))) = |
| 134 | S.abLeftHomologyData.π |
| 135 | (S.abLeftHomologyData.cyclesIso.hom |
| 136 | (cIso.hom (abCyclesMk n L x hx))) |
| 137 | exact h₂ |
| 138 | _ = QuotientAddGroup.mk' (AddMonoidHom.range S.abToCycles) |
| 139 | (⟨x, hx⟩ : AddMonoidHom.ker S.g.hom) := by |
| 140 | change QuotientAddGroup.mk' (AddMonoidHom.range S.abToCycles) |
| 141 | (S.abCyclesIso.hom |
| 142 | (cIso.hom (cIso.inv (S.abCyclesIso.inv ⟨x, hx⟩)))) = _ |
| 143 | rw [cIso.inv_hom_id_apply, S.abCyclesIso.inv_hom_id_apply] |
| 144 | have hclass : |
| 145 | QuotientAddGroup.mk' (AddMonoidHom.range S.abToCycles) |
| 146 | (⟨x, hx⟩ : AddMonoidHom.ker S.g.hom) = 0 := by |
| 147 | rw [← class_eq, hzero, map_zero] |
| 148 | have hmem := (QuotientAddGroup.eq_zero_iff |
| 149 | (⟨x, hx⟩ : AddMonoidHom.ker S.g.hom)).mp hclass |
| 150 | rw [AddMonoidHom.mem_range] at hmem |
| 151 | obtain ⟨b, hb⟩ := hmem |
| 152 | refine ⟨b, ?_⟩ |
| 153 | have hb' := congrArg Subtype.val hb |
| 154 | exact hb' |
| 155 | |
| 156 | theorem homologyMap_abCyclesMk |
| 157 | {L M : CochainComplex AddCommGrpCat.{u} ℕ} (f : L ⟶ M) |
| 158 | (x : L.X (n + 1)) (hx : L.d (n + 1) (n + 2) x = 0) |
| 159 | (hfx : M.d (n + 1) (n + 2) (f.f (n + 1) x) = 0) : |
| 160 | HomologicalComplex.homologyMap f (n + 1) |
| 161 | (L.homologyπ (n + 1) (abCyclesMk n L x hx)) = |
| 162 | M.homologyπ (n + 1) (abCyclesMk n M (f.f (n + 1) x) hfx) := by |
| 163 | have h := congrArg (fun g ↦ g (abCyclesMk n L x hx)) |
| 164 | (HomologicalComplex.homologyπ_naturality (φ := f) (i := n + 1)) |
| 165 | simp only [ConcreteCategory.comp_apply, cyclesMap_cyclesMk n f x hx hfx] at h |
| 166 | exact h |
| 167 | |
| 168 | end |
| 169 | |
| 170 | end OAI.AlgebraicGeometry.SheafCohomology.Cech.PositiveCycleHomology.Projective.CycleHomology |