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 Mathlib.Algebra.Homology.QuasiIso |
| 2 | import Mathlib.Algebra.Homology.ShortComplex.ModuleCat |
| 3 | |
| 4 | /-! # Cochain Head D -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.Quotients.FiniteDescent.CochainHeadD |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Removing and adjoining the first term of a cochain complex. -/ |
| 11 | |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open _root_.CategoryTheory _root_.CategoryTheory.Limits |
| 15 | |
| 16 | universe u v |
| 17 | |
| 18 | namespace Construction.CochainHead |
| 19 | |
| 20 | variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] |
| 21 | |
| 22 | abbrev tail (C : CochainComplex V ℕ) : CochainComplex V ℕ := |
| 23 | CochainComplex.of (fun n => C.X (n + 1)) |
| 24 | (fun n => C.d (n + 1) (n + 1 + 1)) (fun _ => C.d_comp_d _ _ _) |
| 25 | |
| 26 | theorem tail_d (C : CochainComplex V ℕ) (i j : ℕ) : |
| 27 | (tail C).d i j = C.d (i + 1) (j + 1) := by |
| 28 | by_cases h : i + 1 = j |
| 29 | · subst j |
| 30 | exact CochainComplex.of_d (fun n => C.X (n + 1)) |
| 31 | (fun n => C.d (n + 1) (n + 1 + 1)) i |
| 32 | · rw [HomologicalComplex.shape _ _ _ h] |
| 33 | exact (C.shape _ _ (by simpa only [ComplexShape.up_Rel, Nat.add_right_cancel_iff] using h)).symm |
| 34 | |
| 35 | def tailMap {C D : CochainComplex V ℕ} (φ : C ⟶ D) : tail C ⟶ tail D := |
| 36 | CochainComplex.ofHom (fun i => φ.f (i + 1)) (by |
| 37 | intro i |
| 38 | rw [tail_d, tail_d] |
| 39 | exact φ.comm _ _) |
| 40 | |
| 41 | abbrev consX (A : V) (C : CochainComplex V ℕ) : ℕ → V |
| 42 | | 0 => A |
| 43 | | n + 1 => C.X n |
| 44 | |
| 45 | abbrev consD (A : V) (C : CochainComplex V ℕ) (d : A ⟶ C.X 0) : |
| 46 | ∀ n, consX A C n ⟶ consX A C (n + 1) |
| 47 | | 0 => d |
| 48 | | n + 1 => C.d n (n + 1) |
| 49 | |
| 50 | abbrev cons (A : V) (C : CochainComplex V ℕ) (d : A ⟶ C.X 0) |
| 51 | (h : d ≫ C.d 0 1 = 0) : CochainComplex V ℕ := |
| 52 | CochainComplex.of (consX A C) (consD A C d) (fun n => by |
| 53 | cases n with |
| 54 | | zero => exact h |
| 55 | | succ n => exact C.d_comp_d _ _ _) |
| 56 | |
| 57 | theorem cons_d_zero (A : V) (C : CochainComplex V ℕ) (d : A ⟶ C.X 0) |
| 58 | (h : d ≫ C.d 0 1 = 0) : (cons A C d h).d 0 1 = d := |
| 59 | CochainComplex.of_d (consX A C) (consD A C d) 0 |
| 60 | |
| 61 | theorem cons_d_succ (A : V) (C : CochainComplex V ℕ) (d : A ⟶ C.X 0) |
| 62 | (h : d ≫ C.d 0 1 = 0) (i j : ℕ) : |
| 63 | (cons A C d h).d (i + 1) (j + 1) = C.d i j := by |
| 64 | by_cases hij : i + 1 = j |
| 65 | · subst j |
| 66 | exact CochainComplex.of_d (consX A C) (consD A C d) (i + 1) |
| 67 | · rw [HomologicalComplex.shape _ _ _ (by |
| 68 | simpa only [ComplexShape.up_Rel, Nat.add_right_cancel_iff] using hij)] |
| 69 | exact (C.shape _ _ hij).symm |
| 70 | |
| 71 | def consMap {A B : V} {C D : CochainComplex V ℕ} (f : A ⟶ B) (φ : C ⟶ D) |
| 72 | (d : A ⟶ C.X 0) (e : B ⟶ D.X 0) |
| 73 | (hd : d ≫ C.d 0 1 = 0) (he : e ≫ D.d 0 1 = 0) |
| 74 | (h : f ≫ e = d ≫ φ.f 0) : cons A C d hd ⟶ cons B D e he := |
| 75 | CochainComplex.ofHom (fun n => match n with |
| 76 | | 0 => f |
| 77 | | n + 1 => φ.f n) (by |
| 78 | intro n |
| 79 | cases n with |
| 80 | | zero => |
| 81 | change f ≫ (cons B D e he).d 0 1 = (cons A C d hd).d 0 1 ≫ φ.f 0 |
| 82 | rw [cons_d_zero, cons_d_zero] |
| 83 | exact h |
| 84 | | succ n => simpa only [cons, CochainComplex.of_d, consD] using φ.comm n (n + 1)) |
| 85 | |
| 86 | def consTailIso (C : CochainComplex V ℕ) : |
| 87 | cons (C.X 0) (tail C) (C.d 0 1) (by rw [tail_d]; exact C.d_comp_d _ _ _) ≅ C := |
| 88 | HomologicalComplex.Hom.isoOfComponents (fun n => match n with |
| 89 | | 0 => Iso.refl _ |
| 90 | | _ + 1 => Iso.refl _) (by |
| 91 | intro i j hij |
| 92 | change i + 1 = j at hij |
| 93 | subst j |
| 94 | cases i <;> simp [cons, consD, tail, CochainComplex.of.d]) |
| 95 | |
| 96 | def tailWindowIso (C : CochainComplex V ℕ) (i j k : ℕ) : |
| 97 | (tail C).sc' i j k ≅ C.sc' (i + 1) (j + 1) (k + 1) := |
| 98 | ShortComplex.isoMk (Iso.refl _) (Iso.refl _) (Iso.refl _) |
| 99 | (by |
| 100 | change 𝟙 (C.X (i + 1)) ≫ C.d (i + 1) (j + 1) = |
| 101 | (tail C).d i j ≫ 𝟙 (C.X (j + 1)) |
| 102 | rw [Category.id_comp, Category.comp_id, tail_d]) |
| 103 | (by |
| 104 | change 𝟙 (C.X (j + 1)) ≫ C.d (j + 1) (k + 1) = |
| 105 | (tail C).d j k ≫ 𝟙 (C.X (k + 1)) |
| 106 | rw [Category.id_comp, Category.comp_id, tail_d]) |
| 107 | |
| 108 | end Construction.CochainHead |
| 109 | |
| 110 | end |
| 111 | |
| 112 | end OAI.AlgebraicGeometry.Quotients.FiniteDescent.CochainHeadD |