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.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Tensor.SpectralObject |
| 2 | |
| 3 | /-! # Brutal Filtration -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.BrutalFiltration |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | section |
| 10 | |
| 11 | /-! An increasing filtration of a cochain complex by its tails. Stage `p` |
| 12 | contains degree `n` exactly when `-n ≤ p`. The stages at negative and positive |
| 13 | infinity are zero and the whole complex. -/ |
| 14 | |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | set_option backward.isDefEq.respectTransparency.types false |
| 17 | |
| 18 | open _root_.CategoryTheory _root_.CategoryTheory.Limits |
| 19 | open scoped Classical |
| 20 | |
| 21 | variable (R : Type) [CommRing R] (A : CochainComplex (ModuleCat.{0} R) ℤ) |
| 22 | |
| 23 | def term (p : EInt) (n : ℤ) : Submodule R (A.X n) := |
| 24 | if ((-n : ℤ) : EInt) ≤ p then ⊤ else ⊥ |
| 25 | |
| 26 | theorem term_mono {p q : EInt} (h : p ≤ q) (n : ℤ) : term R A p n ≤ term R A q n := by |
| 27 | by_cases hp : ((-n : ℤ) : EInt) ≤ p |
| 28 | · simp only [term, ite_eq_left hp, ite_eq_left (hp.trans h), le_refl] |
| 29 | · simp only [term, ite_eq_right hp, bot_le] |
| 30 | |
| 31 | theorem differential_mem (p : EInt) (n m : ℤ) (x : A.X n) (hx : x ∈ term R A p n) : |
| 32 | (A.d n m).hom x ∈ term R A p m := by |
| 33 | by_cases hm : ((-m : ℤ) : EInt) ≤ p |
| 34 | · simp only [term, ite_eq_left hm, Submodule.mem_top] |
| 35 | · by_cases hnm : n + 1 = m |
| 36 | · have hmn : ((-m : ℤ) : EInt) ≤ ((-n : ℤ) : EInt) := by |
| 37 | exact WithBotTop.coe_le_coe.mpr (show -m ≤ -n by omega) |
| 38 | have hn : ¬ ((-n : ℤ) : EInt) ≤ p := fun hn => hm (hmn.trans hn) |
| 39 | have hx0 : x = 0 := by simpa only [term, ite_eq_right hn, Submodule.mem_bot] using hx |
| 40 | rw [hx0, map_zero] |
| 41 | exact Submodule.zero_mem _ |
| 42 | · have hz : A.d n m = 0 := A.shape n m hnm |
| 43 | rw [hz] |
| 44 | exact Submodule.zero_mem _ |
| 45 | |
| 46 | def complex (p : EInt) : CochainComplex (ModuleCat.{0} R) ℤ where |
| 47 | X n := ModuleCat.of R (term R A p n) |
| 48 | d n m := ModuleCat.ofHom (((A.d n m).hom.comp (term R A p n).subtype).codRestrict |
| 49 | (term R A p m) (fun x => differential_mem R A p n m x.val x.property)) |
| 50 | shape n m hnm := by |
| 51 | ext x |
| 52 | change (A.d n m).hom x.val = 0 |
| 53 | rw [A.shape n m hnm] |
| 54 | rfl |
| 55 | d_comp_d' n m k _ _ := by |
| 56 | ext x |
| 57 | exact congrArg (fun f : A.X n ⟶ A.X k => f.hom x.val) (A.d_comp_d n m k) |
| 58 | |
| 59 | def inclusion {p q : EInt} (h : p ≤ q) : complex R A p ⟶ complex R A q where |
| 60 | f n := ModuleCat.ofHom (Submodule.inclusion (term_mono R A h n)) |
| 61 | comm' n m _ := by |
| 62 | ext x |
| 63 | rfl |
| 64 | |
| 65 | def filtration : EInt ⥤ CochainComplex (ModuleCat.{0} R) ℤ where |
| 66 | obj := complex R A |
| 67 | map f := BrutalFiltration.inclusion R A (leOfHom f) |
| 68 | map_id p := by |
| 69 | apply HomologicalComplex.Hom.ext |
| 70 | funext n |
| 71 | ext x |
| 72 | rfl |
| 73 | map_comp f g := by |
| 74 | apply HomologicalComplex.Hom.ext |
| 75 | funext n |
| 76 | ext x |
| 77 | rfl |
| 78 | |
| 79 | def toComplex (p : EInt) : complex R A p ⟶ A where |
| 80 | f n := ModuleCat.ofHom (term R A p n).subtype |
| 81 | comm' n m _ := by |
| 82 | ext x |
| 83 | rfl |
| 84 | |
| 85 | theorem toComplex_mono (p : EInt) : Mono (toComplex R A p) := by |
| 86 | apply HomologicalComplex.mono_of_mono_f |
| 87 | intro n |
| 88 | exact (ModuleCat.mono_iff_injective _).mpr Subtype.val_injective |
| 89 | |
| 90 | theorem zero_below (p : EInt) (n : ℤ) (hn : ¬ ((-n : ℤ) : EInt) ≤ p) : |
| 91 | IsZero ((complex R A p).X n) := by |
| 92 | let : Subsingleton (term R A p n) := by |
| 93 | dsimp only [term] |
| 94 | rw [ite_eq_right hn] |
| 95 | infer_instance |
| 96 | change IsZero (ModuleCat.of R (term R A p n)) |
| 97 | exact ModuleCat.isZero_of_subsingleton _ |
| 98 | |
| 99 | def termIso (p : EInt) (n : ℤ) (hn : ((-n : ℤ) : EInt) ≤ p) : |
| 100 | (complex R A p).X n ≅ A.X n := |
| 101 | (LinearEquiv.ofBijective (term R A p n).subtype |
| 102 | ⟨Subtype.val_injective, fun x => ⟨⟨x, by simp only [term, ite_eq_left hn, Submodule.mem_top]⟩, rfl⟩⟩).toModuleIso |
| 103 | |
| 104 | theorem termIso_hom (p : EInt) (n : ℤ) (hn : ((-n : ℤ) : EInt) ≤ p) : |
| 105 | (termIso R A p n hn).hom = (toComplex R A p).f n := rfl |
| 106 | |
| 107 | theorem toComplex_f_isIso (p : EInt) (n : ℤ) (hn : ((-n : ℤ) : EInt) ≤ p) : |
| 108 | IsIso ((toComplex R A p).f n) := by |
| 109 | rw [← termIso_hom R A p n hn] |
| 110 | infer_instance |
| 111 | |
| 112 | def topIso : complex R A ⊤ ≅ A := |
| 113 | HomologicalComplex.Hom.isoOfComponents (fun n => termIso R A ⊤ n le_top) |
| 114 | (fun n m _ => by |
| 115 | rw [termIso_hom, termIso_hom] |
| 116 | exact (toComplex R A ⊤).comm n m) |
| 117 | |
| 118 | theorem bot_isZero : IsZero (complex R A ⊥) := by |
| 119 | apply (IsZero.iff_id_eq_zero _).mpr |
| 120 | apply HomologicalComplex.Hom.ext |
| 121 | funext n |
| 122 | exact (zero_below R A ⊥ n (by simp)).eq_of_src _ _ |
| 123 | |
| 124 | theorem inclusion_toComplex {p q : EInt} (h : p ≤ q) : |
| 125 | BrutalFiltration.inclusion R A h ≫ toComplex R A q = toComplex R A p := by |
| 126 | apply HomologicalComplex.Hom.ext |
| 127 | funext n |
| 128 | rfl |
| 129 | |
| 130 | theorem inclusion_f_isIso {p q : EInt} (h : p ≤ q) (n : ℤ) |
| 131 | (hn : ((-n : ℤ) : EInt) ≤ p) : IsIso ((BrutalFiltration.inclusion R A h).f n) := by |
| 132 | let := toComplex_f_isIso R A p n hn |
| 133 | let := toComplex_f_isIso R A q n (hn.trans h) |
| 134 | have he : (BrutalFiltration.inclusion R A h).f n ≫ (toComplex R A q).f n = (toComplex R A p).f n := rfl |
| 135 | exact IsIso.of_isIso_fac_right he |
| 136 | |
| 137 | end |
| 138 | |
| 139 | /-! A complex supported in a finite interval has zero lower filtration |
| 140 | stages and constant upper stages, through the native inclusion maps. -/ |
| 141 | |
| 142 | set_option backward.isDefEq.respectTransparency false |
| 143 | set_option backward.isDefEq.respectTransparency.types false |
| 144 | |
| 145 | open _root_.CategoryTheory _root_.CategoryTheory.Limits |
| 146 | |
| 147 | namespace Bounds |
| 148 | |
| 149 | open OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.BrutalFiltration |
| 150 | |
| 151 | variable (R : Type) [CommRing R] (A : CochainComplex (ModuleCat.{0} R) ℤ) |
| 152 | |
| 153 | theorem term_zero (p : EInt) (i : ℤ) (h : IsZero (A.X i)) : IsZero ((complex R A p).X i) := by |
| 154 | let : Mono ((toComplex R A p).f i) := (ModuleCat.mono_iff_injective _).mpr Subtype.val_injective |
| 155 | exact IsZero.of_mono ((toComplex R A p).f i) h |
| 156 | |
| 157 | theorem stage_zero (u p : ℤ) (hA : ∀ i, u < i → IsZero (A.X i)) (hp : p < -u) : |
| 158 | IsZero (complex R A (p : EInt)) := by |
| 159 | apply (IsZero.iff_id_eq_zero _).mpr |
| 160 | apply HomologicalComplex.Hom.ext |
| 161 | funext i |
| 162 | by_cases hi : -i ≤ p |
| 163 | · exact (term_zero R A (p : EInt) i (hA i (by omega))).eq_of_src _ _ |
| 164 | · exact (zero_below R A (p : EInt) i (fun h => hi (WithBotTop.coe_le_coe.mp h))).eq_of_src _ _ |
| 165 | |
| 166 | theorem toComplex_isIso (l p : ℤ) (hA : ∀ i, i < l → IsZero (A.X i)) (hp : -l ≤ p) : |
| 167 | IsIso (toComplex R A (p : EInt)) := by |
| 168 | let : ∀ i, IsIso ((toComplex R A (p : EInt)).f i) := by |
| 169 | intro i |
| 170 | by_cases hi : -i ≤ p |
| 171 | · exact toComplex_f_isIso R A (p : EInt) i (WithBotTop.coe_le_coe.mpr hi) |
| 172 | · have hz := hA i (by omega) |
| 173 | exact (term_zero R A (p : EInt) i hz).isIso hz _ |
| 174 | exact HomologicalComplex.Hom.isIso_of_components _ |
| 175 | |
| 176 | theorem inclusion_isIso_above (l p q : ℤ) (hpq : p ≤ q) |
| 177 | (hA : ∀ i, i < l → IsZero (A.X i)) (hp : -l ≤ p) : |
| 178 | IsIso (BrutalFiltration.inclusion R A (WithBotTop.coe_le_coe.mpr hpq)) := by |
| 179 | let := toComplex_isIso R A l p hA hp |
| 180 | let := toComplex_isIso R A l q hA (hp.trans hpq) |
| 181 | exact IsIso.of_isIso_fac_right (inclusion_toComplex R A (WithBotTop.coe_le_coe.mpr hpq)) |
| 182 | |
| 183 | theorem inclusion_isIso_below (u p q : ℤ) (hpq : p ≤ q) |
| 184 | (hA : ∀ i, u < i → IsZero (A.X i)) (hq : q < -u) : |
| 185 | IsIso (BrutalFiltration.inclusion R A (WithBotTop.coe_le_coe.mpr hpq)) := |
| 186 | (stage_zero R A u p hA (lt_of_le_of_lt hpq hq)).isIso (stage_zero R A u q hA hq) _ |
| 187 | |
| 188 | end Bounds |
| 189 | |
| 190 | end |
| 191 | |
| 192 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.BrutalFiltration |