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 | Copyright (c) 2026 The AINTLIB contributors. All rights reserved. |
| 3 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | Authors: AINTLIB ModularCurves project |
| 5 | This file has been modified. |
| 6 | -/ |
| 7 | import Mathlib.RingTheory.Noetherian.Basic |
| 8 | import OAI.AlgebraicGeometry.SheafCohomology.Projective.CechSupportContraction |
| 9 | import OAI.AlgebraicGeometry.SheafCohomology.Projective.OrderedBaseCech |
| 10 | |
| 11 | /-! # Ordered Cech Support Contraction -/ |
| 12 | |
| 13 | namespace OAI.AlgebraicGeometry.SheafCohomology.Projective.OrderedCechSupportContraction |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | /-! |
| 18 | # Degree-one contraction of ordered support-restricted Cech cochains |
| 19 | |
| 20 | This file gives the ordered degree-one specialization of the support contraction used in |
| 21 | [Stacks Project, Lemma 30.8.1 (Tag 01XT)](https://stacks.math.columbia.edu/tag/01XT). |
| 22 | For an index outside the required support, insertion into an ordered singleton contracts every |
| 23 | degree-one cocycle. |
| 24 | -/ |
| 25 | |
| 26 | open Set |
| 27 | |
| 28 | universe u v |
| 29 | |
| 30 | variable (R : Type u) {ι : Type v} [CommRing R] [LinearOrder ι] |
| 31 | |
| 32 | private def orderedCechSingleton (i : ι) : |
| 33 | OrderedBaseCech.Scheme.Modules.OrderedCechIndex ι 0 := |
| 34 | ⟨![i], by |
| 35 | apply Fin.strictMono_iff_lt_succ.2 |
| 36 | intro k |
| 37 | exact Fin.elim0 k⟩ |
| 38 | |
| 39 | private def orderedCechPair (i j : ι) (hij : i < j) : |
| 40 | OrderedBaseCech.Scheme.Modules.OrderedCechIndex ι 1 := |
| 41 | ⟨![i, j], by |
| 42 | apply Fin.strictMono_iff_lt_succ.2 |
| 43 | intro k |
| 44 | fin_cases k |
| 45 | exact hij⟩ |
| 46 | |
| 47 | private def orderedCechTriple (i j k : ι) (hij : i < j) (hjk : j < k) : |
| 48 | OrderedBaseCech.Scheme.Modules.OrderedCechIndex ι 2 := |
| 49 | ⟨![i, j, k], by |
| 50 | apply Fin.strictMono_iff_lt_succ.2 |
| 51 | intro l |
| 52 | fin_cases l |
| 53 | · exact hij |
| 54 | · exact hjk⟩ |
| 55 | |
| 56 | @[simp] |
| 57 | private theorem orderedCechPair_delete_zero (i j : ι) (hij : i < j) : |
| 58 | (orderedCechPair i j hij).delete 0 = orderedCechSingleton j := by |
| 59 | apply Subtype.ext |
| 60 | funext k |
| 61 | fin_cases k |
| 62 | rfl |
| 63 | |
| 64 | @[simp] |
| 65 | private theorem orderedCechPair_delete_one (i j : ι) (hij : i < j) : |
| 66 | (orderedCechPair i j hij).delete 1 = orderedCechSingleton i := by |
| 67 | apply Subtype.ext |
| 68 | funext k |
| 69 | fin_cases k |
| 70 | rfl |
| 71 | |
| 72 | @[simp] |
| 73 | private theorem orderedCechTriple_delete_zero (i j k : ι) |
| 74 | (hij : i < j) (hjk : j < k) : |
| 75 | (orderedCechTriple i j k hij hjk).delete 0 = orderedCechPair j k hjk := by |
| 76 | apply Subtype.ext |
| 77 | funext l |
| 78 | fin_cases l <;> rfl |
| 79 | |
| 80 | @[simp] |
| 81 | private theorem orderedCechTriple_delete_one (i j k : ι) |
| 82 | (hij : i < j) (hjk : j < k) : |
| 83 | (orderedCechTriple i j k hij hjk).delete 1 = |
| 84 | orderedCechPair i k (hij.trans hjk) := by |
| 85 | apply Subtype.ext |
| 86 | funext l |
| 87 | fin_cases l <;> rfl |
| 88 | |
| 89 | @[simp] |
| 90 | private theorem orderedCechTriple_delete_two (i j k : ι) |
| 91 | (hij : i < j) (hjk : j < k) : |
| 92 | (orderedCechTriple i j k hij hjk).delete 2 = orderedCechPair i j hij := by |
| 93 | apply Subtype.ext |
| 94 | funext l |
| 95 | fin_cases l <;> rfl |
| 96 | |
| 97 | /-- Ordered Cech cochains supported on tuples whose range contains `N`. -/ |
| 98 | def OrderedCechSupportCochain (N : Set ι) (n : ℕ) : |
| 99 | Submodule R |
| 100 | (OrderedBaseCech.Scheme.Modules.OrderedCechIndex ι n → R) where |
| 101 | carrier := {s | ∀ a, ¬N ⊆ Set.range a.1 → s a = 0} |
| 102 | zero_mem' := by |
| 103 | intro a ha |
| 104 | rfl |
| 105 | add_mem' := by |
| 106 | intro s t hs ht a ha |
| 107 | simp [hs a ha, ht a ha] |
| 108 | smul_mem' := by |
| 109 | intro r s hs a ha |
| 110 | simp [hs a ha] |
| 111 | |
| 112 | /-- Ordered support-restricted Cech cochains on a finite index type form a finite module over a |
| 113 | Noetherian coefficient ring. -/ |
| 114 | theorem OrderedCechSupportCochain.module_finite |
| 115 | [IsNoetherianRing R] [Finite ι] (N : Set ι) (n : ℕ) : |
| 116 | Module.Finite R (OrderedCechSupportCochain R N n) := by |
| 117 | let : Finite (OrderedBaseCech.Scheme.Modules.OrderedCechIndex ι n) := |
| 118 | Subtype.finite |
| 119 | let : IsNoetherian R |
| 120 | (OrderedBaseCech.Scheme.Modules.OrderedCechIndex ι n → R) := inferInstance |
| 121 | let : IsNoetherian R (OrderedCechSupportCochain R N n) := |
| 122 | isNoetherian_of_submodule_of_noetherian R _ _ inferInstance |
| 123 | infer_instance |
| 124 | |
| 125 | private theorem orderedCechDelete_range_subset {n : ℕ} |
| 126 | (a : OrderedBaseCech.Scheme.Modules.OrderedCechIndex ι (n + 1)) |
| 127 | (k : Fin (n + 2)) : |
| 128 | Set.range (a.delete k).1 ⊆ Set.range a.1 := by |
| 129 | rintro x ⟨l, rfl⟩ |
| 130 | exact ⟨k.succAbove l, rfl⟩ |
| 131 | |
| 132 | /-- The alternating deletion differential on ordered support-restricted Cech cochains. -/ |
| 133 | def orderedCechSupportDifferential (N : Set ι) (n : ℕ) : |
| 134 | OrderedCechSupportCochain R N n →ₗ[R] |
| 135 | OrderedCechSupportCochain R N (n + 1) where |
| 136 | toFun s := |
| 137 | ⟨fun a => ∑ k : Fin (n + 2), |
| 138 | (-1 : R) ^ (k : ℕ) * s.1 (a.delete k), |
| 139 | fun a ha => by |
| 140 | apply Finset.sum_eq_zero |
| 141 | intro k hk |
| 142 | have hdelete : ¬N ⊆ Set.range (a.delete k).1 := |
| 143 | fun hN => ha (Subset.trans hN (orderedCechDelete_range_subset a k)) |
| 144 | rw [s.2 _ hdelete, mul_zero]⟩ |
| 145 | map_add' s t := by |
| 146 | apply Subtype.ext |
| 147 | funext a |
| 148 | simp only [Submodule.coe_add, Pi.add_apply] |
| 149 | rw [← Finset.sum_add_distrib] |
| 150 | apply Finset.sum_congr rfl |
| 151 | intro k hk |
| 152 | rw [mul_add] |
| 153 | map_smul' r s := by |
| 154 | apply Subtype.ext |
| 155 | funext a |
| 156 | simp only [Submodule.coe_smul_of_tower, Pi.smul_apply, |
| 157 | RingHom.id_apply, smul_eq_mul] |
| 158 | rw [Finset.mul_sum] |
| 159 | apply Finset.sum_congr rfl |
| 160 | intro k hk |
| 161 | ac_rfl |
| 162 | |
| 163 | private theorem orderedCechPair_left_not_subset {N : Set ι} {i₀ : ι} |
| 164 | (hi₀ : i₀ ∉ N) |
| 165 | (a : OrderedBaseCech.Scheme.Modules.OrderedCechIndex ι 0) |
| 166 | (ha : ¬N ⊆ Set.range a.1) (h : i₀ < a.1 0) : |
| 167 | ¬N ⊆ Set.range (orderedCechPair i₀ (a.1 0) h).1 := by |
| 168 | intro hN |
| 169 | apply ha |
| 170 | intro x hx |
| 171 | rcases hN hx with ⟨k, hk⟩ |
| 172 | fin_cases k |
| 173 | · have hix : i₀ = x := by |
| 174 | simpa [orderedCechPair] using hk |
| 175 | subst x |
| 176 | exact (hi₀ hx).elim |
| 177 | · exact ⟨0, by simpa [orderedCechPair] using hk⟩ |
| 178 | |
| 179 | private theorem orderedCechPair_right_not_subset {N : Set ι} {i₀ : ι} |
| 180 | (hi₀ : i₀ ∉ N) |
| 181 | (a : OrderedBaseCech.Scheme.Modules.OrderedCechIndex ι 0) |
| 182 | (ha : ¬N ⊆ Set.range a.1) (h : a.1 0 < i₀) : |
| 183 | ¬N ⊆ Set.range (orderedCechPair (a.1 0) i₀ h).1 := by |
| 184 | intro hN |
| 185 | apply ha |
| 186 | intro x hx |
| 187 | rcases hN hx with ⟨k, hk⟩ |
| 188 | fin_cases k |
| 189 | · exact ⟨0, by simpa [orderedCechPair] using hk⟩ |
| 190 | · have hix : i₀ = x := by |
| 191 | simpa [orderedCechPair] using hk |
| 192 | subst x |
| 193 | exact (hi₀ hx).elim |
| 194 | |
| 195 | private def orderedCechSupportContractionOne (N : Set ι) (i₀ : ι) |
| 196 | (hi₀ : i₀ ∉ N) : |
| 197 | OrderedCechSupportCochain R N 1 →ₗ[R] |
| 198 | OrderedCechSupportCochain R N 0 where |
| 199 | toFun s := |
| 200 | ⟨fun a => |
| 201 | if h : i₀ < a.1 0 then s.1 (orderedCechPair i₀ (a.1 0) h) |
| 202 | else if h : a.1 0 < i₀ then -s.1 (orderedCechPair (a.1 0) i₀ h) |
| 203 | else 0, |
| 204 | fun a ha => by |
| 205 | dsimp |
| 206 | split_ifs with hleft hright |
| 207 | · exact s.2 _ (orderedCechPair_left_not_subset hi₀ a ha hleft) |
| 208 | · rw [s.2 _ (orderedCechPair_right_not_subset hi₀ a ha hright), neg_zero] |
| 209 | · rfl⟩ |
| 210 | map_add' s t := by |
| 211 | apply Subtype.ext |
| 212 | funext a |
| 213 | simp only [Submodule.coe_add, Pi.add_apply] |
| 214 | split_ifs <;> simp |
| 215 | all_goals abel |
| 216 | map_smul' r s := by |
| 217 | apply Subtype.ext |
| 218 | funext a |
| 219 | simp only [Submodule.coe_smul_of_tower, Pi.smul_apply, |
| 220 | RingHom.id_apply, smul_eq_mul] |
| 221 | split_ifs <;> simp |
| 222 | |
| 223 | private theorem orderedCechSupportContractionOne_apply_left {N : Set ι} |
| 224 | {i₀ x : ι} (hi₀ : i₀ ∉ N) (h : i₀ < x) |
| 225 | (s : OrderedCechSupportCochain R N 1) : |
| 226 | (orderedCechSupportContractionOne R N i₀ hi₀ s).1 |
| 227 | (orderedCechSingleton x) = |
| 228 | s.1 (orderedCechPair i₀ x h) := by |
| 229 | simp [orderedCechSupportContractionOne, orderedCechSingleton, h] |
| 230 | |
| 231 | private theorem orderedCechSupportContractionOne_apply_right {N : Set ι} |
| 232 | {i₀ x : ι} (hi₀ : i₀ ∉ N) (h : x < i₀) |
| 233 | (s : OrderedCechSupportCochain R N 1) : |
| 234 | (orderedCechSupportContractionOne R N i₀ hi₀ s).1 |
| 235 | (orderedCechSingleton x) = |
| 236 | -s.1 (orderedCechPair x i₀ h) := by |
| 237 | simp [orderedCechSupportContractionOne, orderedCechSingleton, h, |
| 238 | not_lt_of_ge h.le] |
| 239 | |
| 240 | private theorem orderedCechSupportContractionOne_apply_self {N : Set ι} |
| 241 | (i₀ : ι) (hi₀ : i₀ ∉ N) |
| 242 | (s : OrderedCechSupportCochain R N 1) : |
| 243 | (orderedCechSupportContractionOne R N i₀ hi₀ s).1 |
| 244 | (orderedCechSingleton i₀) = 0 := by |
| 245 | simp [orderedCechSupportContractionOne, orderedCechSingleton] |
| 246 | |
| 247 | private theorem orderedCechSupportDifferential_zero_apply_pair (N : Set ι) |
| 248 | (t : OrderedCechSupportCochain R N 0) |
| 249 | (i j : ι) (hij : i < j) : |
| 250 | (orderedCechSupportDifferential R N 0 t).1 |
| 251 | (orderedCechPair i j hij) = |
| 252 | t.1 (orderedCechSingleton j) - t.1 (orderedCechSingleton i) := by |
| 253 | simp [orderedCechSupportDifferential, Fin.sum_univ_succ, sub_eq_add_neg] |
| 254 | |
| 255 | /-- If `N` is nonempty and omits an index, the degree-zero ordered support differential is |
| 256 | injective. -/ |
| 257 | theorem orderedCechSupportDifferential_zero_injective |
| 258 | (N : Set ι) (hN : N.Nonempty) (i₀ : ι) (hi₀ : i₀ ∉ N) : |
| 259 | Function.Injective (orderedCechSupportDifferential R N 0) := by |
| 260 | intro s t hst |
| 261 | have hzero : orderedCechSupportDifferential R N 0 (s - t) = 0 := by |
| 262 | rw [map_sub, hst, sub_self] |
| 263 | have hi₀_not_subset : ¬N ⊆ Set.range (orderedCechSingleton i₀).1 := by |
| 264 | intro hsubset |
| 265 | obtain ⟨i, hi⟩ := hN |
| 266 | obtain ⟨k, hk⟩ := hsubset hi |
| 267 | have hik : i = i₀ := by |
| 268 | fin_cases k |
| 269 | exact hk.symm |
| 270 | exact hi₀ (hik ▸ hi) |
| 271 | have hi₀_value : (s - t).1 (orderedCechSingleton i₀) = 0 := |
| 272 | (s - t).2 (orderedCechSingleton i₀) hi₀_not_subset |
| 273 | have hsub : s - t = 0 := by |
| 274 | apply Subtype.ext |
| 275 | funext a |
| 276 | change (s - t).1 a = 0 |
| 277 | by_cases ha : N ⊆ Set.range a.1 |
| 278 | · obtain ⟨i, hi⟩ := hN |
| 279 | obtain ⟨k, hk⟩ := ha hi |
| 280 | have hia : i = a.1 0 := by |
| 281 | fin_cases k |
| 282 | exact hk.symm |
| 283 | have ha_mem : a.1 0 ∈ N := hia ▸ hi |
| 284 | have hi₀_ne : i₀ ≠ a.1 0 := by |
| 285 | intro h |
| 286 | exact hi₀ (h.symm ▸ ha_mem) |
| 287 | have ha_singleton : a = orderedCechSingleton (a.1 0) := by |
| 288 | apply Subtype.ext |
| 289 | funext k |
| 290 | fin_cases k |
| 291 | rfl |
| 292 | rcases lt_or_gt_of_ne hi₀_ne with hi₀a | hai₀ |
| 293 | · have hp : |
| 294 | (orderedCechSupportDifferential R N 0 (s - t)).1 |
| 295 | (orderedCechPair i₀ (a.1 0) hi₀a) = 0 := by |
| 296 | rw [hzero] |
| 297 | rfl |
| 298 | rw [orderedCechSupportDifferential_zero_apply_pair, hi₀_value, |
| 299 | sub_zero] at hp |
| 300 | exact (congrArg (fun b => (s - t).1 b) ha_singleton).trans hp |
| 301 | · have hp : |
| 302 | (orderedCechSupportDifferential R N 0 (s - t)).1 |
| 303 | (orderedCechPair (a.1 0) i₀ hai₀) = 0 := by |
| 304 | rw [hzero] |
| 305 | rfl |
| 306 | rw [orderedCechSupportDifferential_zero_apply_pair, hi₀_value, |
| 307 | zero_sub] at hp |
| 308 | have hp' : (s - t).1 (orderedCechSingleton (a.1 0)) = 0 := |
| 309 | neg_eq_zero.mp hp |
| 310 | exact (congrArg (fun b => (s - t).1 b) ha_singleton).trans hp' |
| 311 | · exact (s - t).2 a ha |
| 312 | exact sub_eq_zero.mp hsub |
| 313 | |
| 314 | /-- On a nontrivial index type, every nonempty support has injective degree-zero ordered support |
| 315 | differential. -/ |
| 316 | theorem orderedCechSupportDifferential_zero_injective_of_nonempty |
| 317 | [Nontrivial ι] (N : Set ι) (hN : N.Nonempty) : |
| 318 | Function.Injective (orderedCechSupportDifferential R N 0) := by |
| 319 | by_cases htop : N = Set.univ |
| 320 | · intro s t _ |
| 321 | apply Subtype.ext |
| 322 | funext a |
| 323 | have hnot : ¬N ⊆ Set.range a.1 := by |
| 324 | intro hsubset |
| 325 | obtain ⟨i, hi⟩ := exists_ne (a.1 0) |
| 326 | have hiN : i ∈ N := by |
| 327 | rw [htop] |
| 328 | exact Set.mem_univ i |
| 329 | obtain ⟨k, hk⟩ := hsubset hiN |
| 330 | fin_cases k |
| 331 | exact hi hk.symm |
| 332 | rw [s.2 a hnot, t.2 a hnot] |
| 333 | · have hnot : ¬(Set.univ : Set ι) ⊆ N := by |
| 334 | intro hsubset |
| 335 | exact htop (Set.Subset.antisymm (Set.subset_univ N) hsubset) |
| 336 | obtain ⟨i₀, _, hi₀⟩ := Set.not_subset.mp hnot |
| 337 | exact orderedCechSupportDifferential_zero_injective R N hN i₀ hi₀ |
| 338 | |
| 339 | private theorem orderedCechSupport_cycle_triple (N : Set ι) |
| 340 | (s : OrderedCechSupportCochain R N 1) |
| 341 | (hs : orderedCechSupportDifferential R N 1 s = 0) |
| 342 | (i j k : ι) (hij : i < j) (hjk : j < k) : |
| 343 | s.1 (orderedCechPair j k hjk) - |
| 344 | s.1 (orderedCechPair i k (hij.trans hjk)) + |
| 345 | s.1 (orderedCechPair i j hij) = 0 := by |
| 346 | have h := congrArg |
| 347 | (fun t : OrderedCechSupportCochain R N 2 => |
| 348 | t.1 (orderedCechTriple i j k hij hjk)) hs |
| 349 | simpa [orderedCechSupportDifferential, Fin.sum_univ_succ, |
| 350 | sub_eq_add_neg, add_assoc] using h |
| 351 | |
| 352 | private theorem orderedCechIndex_one_eq_pair |
| 353 | (a : OrderedBaseCech.Scheme.Modules.OrderedCechIndex ι 1) : |
| 354 | a = orderedCechPair (a.1 0) (a.1 1) (a.2 (by decide)) := by |
| 355 | apply Subtype.ext |
| 356 | funext k |
| 357 | fin_cases k <;> rfl |
| 358 | |
| 359 | /-- If one index lies outside `N`, every ordered degree-one support cocycle is a boundary. -/ |
| 360 | theorem exists_preimage_orderedCechSupportDifferential_zero |
| 361 | (N : Set ι) (i₀ : ι) (hi₀ : i₀ ∉ N) |
| 362 | (s : OrderedCechSupportCochain R N 1) |
| 363 | (hs : orderedCechSupportDifferential R N 1 s = 0) : |
| 364 | ∃ t : OrderedCechSupportCochain R N 0, |
| 365 | orderedCechSupportDifferential R N 0 t = s := by |
| 366 | refine ⟨orderedCechSupportContractionOne R N i₀ hi₀ s, ?_⟩ |
| 367 | apply Subtype.ext |
| 368 | funext a |
| 369 | rw [orderedCechIndex_one_eq_pair a] |
| 370 | let i := a.1 0 |
| 371 | let j := a.1 1 |
| 372 | have hij : i < j := a.2 (by decide) |
| 373 | rw [orderedCechSupportDifferential_zero_apply_pair] |
| 374 | rcases lt_trichotomy i₀ i with h₀i | rfl | hi₀' |
| 375 | · rw [orderedCechSupportContractionOne_apply_left R hi₀ (h₀i.trans hij), |
| 376 | orderedCechSupportContractionOne_apply_left R hi₀ h₀i] |
| 377 | have hcycle := orderedCechSupport_cycle_triple R N s hs i₀ i j h₀i hij |
| 378 | linear_combination -hcycle |
| 379 | · rw [orderedCechSupportContractionOne_apply_left R hi₀ hij, |
| 380 | orderedCechSupportContractionOne_apply_self R i hi₀] |
| 381 | simp [i, j] |
| 382 | · rcases lt_trichotomy i₀ j with h₀j | rfl | hj₀ |
| 383 | · rw [orderedCechSupportContractionOne_apply_left R hi₀ h₀j, |
| 384 | orderedCechSupportContractionOne_apply_right R hi₀ hi₀'] |
| 385 | have hcycle := orderedCechSupport_cycle_triple R N s hs i i₀ j hi₀' h₀j |
| 386 | linear_combination hcycle |
| 387 | · rw [orderedCechSupportContractionOne_apply_self R j hi₀, |
| 388 | orderedCechSupportContractionOne_apply_right R hi₀ hi₀'] |
| 389 | simp [i, j] |
| 390 | · rw [orderedCechSupportContractionOne_apply_right R hi₀ hj₀, |
| 391 | orderedCechSupportContractionOne_apply_right R hi₀ hi₀'] |
| 392 | have hcycle := orderedCechSupport_cycle_triple R N s hs i j i₀ hij hj₀ |
| 393 | linear_combination -hcycle |
| 394 | |
| 395 | end |
| 396 | |
| 397 | end OAI.AlgebraicGeometry.SheafCohomology.Projective.OrderedCechSupportContraction |