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.RegularElementKoszul |
| 2 | import Mathlib.Algebra.Category.ModuleCat.Biproducts |
| 3 | import Mathlib.LinearAlgebra.FreeModule.Finite.Basic |
| 4 | import Mathlib.RingTheory.Finiteness.Prod |
| 5 | |
| 6 | /-! # Regular Sequence Koszul -/ |
| 7 | |
| 8 | namespace OAI.NumberTheory.PadicHodge.IntegralComparison.RegularSequenceKoszul |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! The actual finite Koszul complex of a weakly regular sequence resolves |
| 13 | the original module quotient. Its construction uses scalar mapping cones. -/ |
| 14 | |
| 15 | set_option backward.defeqAttrib.useBackward true |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open _root_.CategoryTheory _root_.CategoryTheory.Limits |
| 19 | open scoped Pointwise |
| 20 | |
| 21 | open OAI.NumberTheory.PadicHodge.IntegralComparison.RegularElementKoszul |
| 22 | |
| 23 | universe u |
| 24 | variable {R : Type u} [CommRing R] |
| 25 | |
| 26 | def complex (M : ModuleCat.{u} R) (rs : List R) : CochainComplex (ModuleCat.{u} R) ℤ := |
| 27 | rs.foldl (fun K r => CochainComplex.mappingCone (RegularElementKoszul.scalar K r)) (RegularElementKoszul.single.obj M) |
| 28 | |
| 29 | @[simp] theorem complex_nil (M : ModuleCat.{u} R) : complex M [] = RegularElementKoszul.single.obj M := rfl |
| 30 | |
| 31 | theorem complex_append_singleton (M : ModuleCat.{u} R) (rs : List R) (r : R) : |
| 32 | complex M (rs ++ [r]) = CochainComplex.mappingCone (RegularElementKoszul.scalar (complex M rs) r) := by |
| 33 | simp only [complex, List.foldl_append, List.foldl_cons, List.foldl_nil] |
| 34 | |
| 35 | abbrev quotient (M : ModuleCat.{u} R) (rs : List R) := |
| 36 | ModuleCat.of R (M ⧸ (Ideal.ofList rs • (⊤ : Submodule R M))) |
| 37 | |
| 38 | def quotientNilIso (M : ModuleCat.{u} R) : quotient M [] ≅ M := |
| 39 | (Submodule.quotEquivOfEqBot _ (by simp)).toModuleIso |
| 40 | |
| 41 | def quotientAppendIso (M : ModuleCat.{u} R) (rs : List R) (r : R) : |
| 42 | quotient M (rs ++ [r]) ≅ ModuleCat.of R (QuotSMulTop r (quotient M rs)) := |
| 43 | ((Submodule.quotEquivOfEq _ _ (by |
| 44 | simp only [Ideal.ofList_append, Ideal.ofList_cons, Ideal.ofList_nil, sup_bot_eq] |
| 45 | rw [sup_comm])) ≪≫ₗ |
| 46 | Submodule.quotOfListConsSMulTopEquivQuotSMulTopOuter M r rs).toModuleIso |
| 47 | |
| 48 | theorem exists_augmentation (M : ModuleCat.{u} R) (rs : List R) |
| 49 | (hreg : RingTheory.Sequence.IsWeaklyRegular M rs) : |
| 50 | ∃ ε : complex M rs ⟶ RegularElementKoszul.single.obj (quotient M rs), QuasiIso ε := by |
| 51 | induction rs using List.reverseRecOn with |
| 52 | | nil => |
| 53 | exact ⟨RegularElementKoszul.single.map (quotientNilIso M).inv, inferInstance⟩ |
| 54 | | append_singleton rs r ih => |
| 55 | obtain ⟨hprev, hlast⟩ := (RingTheory.Sequence.isWeaklyRegular_append_iff M rs [r]).mp hreg |
| 56 | have hr := (RingTheory.Sequence.isWeaklyRegular_singleton_iff (quotient M rs) r).mp hlast |
| 57 | obtain ⟨ε, hε⟩ := ih hprev |
| 58 | rw [complex_append_singleton] |
| 59 | let a := RegularElementKoszul.stepAugmentation (quotient M rs) ε r ≫ RegularElementKoszul.single.map (quotientAppendIso M rs r).inv |
| 60 | have := RegularElementKoszul.stepAugmentation_quasiIso (quotient M rs) ε hε r hr |
| 61 | exact ⟨a, quasiIso_comp _ _⟩ |
| 62 | |
| 63 | theorem term_isZero (M : ModuleCat.{u} R) (rs : List R) (i : ℤ) |
| 64 | (hi : i < -(rs.length : ℤ) ∨ 0 < i) : IsZero ((complex M rs).X i) := by |
| 65 | induction rs using List.reverseRecOn generalizing i with |
| 66 | | nil => |
| 67 | exact HomologicalComplex.isZero_single_obj_X (.up ℤ) 0 M i (by |
| 68 | simp only [List.length_nil, Nat.cast_zero, neg_zero] at hi |
| 69 | omega) |
| 70 | | append_singleton rs r ih => |
| 71 | rw [complex_append_singleton] |
| 72 | apply (CochainComplex.mappingCone.isZero_X_iff _ _).mpr |
| 73 | simp only [List.length_append, List.length_singleton, Nat.cast_add, Nat.cast_one] at hi |
| 74 | exact ⟨ih (i + 1) (by omega), ih i (by omega)⟩ |
| 75 | |
| 76 | def stepTermIso (K : CochainComplex (ModuleCat.{u} R) ℤ) (r : R) (i : ℤ) : |
| 77 | (CochainComplex.mappingCone (RegularElementKoszul.scalar K r)).X i ≅ ModuleCat.of R (K.X (i + 1) × K.X i) := |
| 78 | HomologicalComplex.homotopyCofiber.XIsoBiprod (RegularElementKoszul.scalar K r) i (i + 1) rfl ≪≫ |
| 79 | ModuleCat.biprodIsoProd _ _ |
| 80 | |
| 81 | theorem term_free (M : ModuleCat.{u} R) [Module.Free R M] (rs : List R) (i : ℤ) : |
| 82 | Module.Free R ((complex M rs).X i) := by |
| 83 | induction rs using List.reverseRecOn generalizing i with |
| 84 | | nil => |
| 85 | by_cases hi : i = 0 |
| 86 | · subst i |
| 87 | exact Module.Free.of_equiv |
| 88 | (HomologicalComplex.singleObjXSelf (.up ℤ) 0 M).symm.toLinearEquiv |
| 89 | · have hs := ModuleCat.subsingleton_of_isZero |
| 90 | (HomologicalComplex.isZero_single_obj_X (.up ℤ) 0 M i hi) |
| 91 | let : Subsingleton ((complex M []).X i) := hs |
| 92 | exact Module.Free.of_subsingleton R _ |
| 93 | | append_singleton rs r ih => |
| 94 | rw [complex_append_singleton] |
| 95 | let := ih (i + 1) |
| 96 | let := ih i |
| 97 | exact Module.Free.of_equiv (stepTermIso (complex M rs) r i).symm.toLinearEquiv |
| 98 | |
| 99 | theorem term_finite (M : ModuleCat.{u} R) [Module.Finite R M] (rs : List R) (i : ℤ) : |
| 100 | Module.Finite R ((complex M rs).X i) := by |
| 101 | induction rs using List.reverseRecOn generalizing i with |
| 102 | | nil => |
| 103 | by_cases hi : i = 0 |
| 104 | · subst i |
| 105 | exact Module.Finite.equiv (HomologicalComplex.singleObjXSelf (.up ℤ) 0 M).symm.toLinearEquiv |
| 106 | · have hs := ModuleCat.subsingleton_of_isZero |
| 107 | (HomologicalComplex.isZero_single_obj_X (.up ℤ) 0 M i hi) |
| 108 | let : Subsingleton ((complex M []).X i) := hs |
| 109 | infer_instance |
| 110 | | append_singleton rs r ih => |
| 111 | rw [complex_append_singleton] |
| 112 | let := ih (i + 1) |
| 113 | let := ih i |
| 114 | exact Module.Finite.equiv (stepTermIso (complex M rs) r i).symm.toLinearEquiv |
| 115 | |
| 116 | end |
| 117 | |
| 118 | end OAI.NumberTheory.PadicHodge.IntegralComparison.RegularSequenceKoszul |