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/SheafCohomologyExact.lean |
| 4 | The upstream AINTLIB repository is licensed under Apache 2.0. |
| 5 | This file has been modified. |
| 6 | -/ |
| 7 | import Mathlib.Algebra.Homology.DerivedCategory.Ext.ExactSequences |
| 8 | import Mathlib.CategoryTheory.Sites.SheafCohomology.ExactSequences |
| 9 | |
| 10 | /-! # Exact -/ |
| 11 | |
| 12 | namespace OAI.AlgebraicGeometry.SheafCohomology.Exact.CategoryTheory.Sheaf |
| 13 | |
| 14 | open _root_.CategoryTheory |
| 15 | open _root_.CategoryTheory.Sheaf |
| 16 | |
| 17 | /-! |
| 18 | # Exact sequences in sheaf cohomology |
| 19 | |
| 20 | Mathlib supplies the connecting map and long exact sequence. This module keeps |
| 21 | explicit-degree exactness wrappers and additional vanishing consequences used |
| 22 | by the ProjectiveCohomology development. The additional lemmas originate in AINTLIB's |
| 23 | `ForMathlib/SheafCohomologyExact.lean`. |
| 24 | -/ |
| 25 | |
| 26 | open Abelian _root_.AddCommGrpCat |
| 27 | |
| 28 | universe w' w v u |
| 29 | |
| 30 | variable {C : Type u} [Category.{v} C] {J : GrothendieckTopology C} |
| 31 | [HasSheafify J AddCommGrpCat.{w}] [HasExt.{w'} (Sheaf J AddCommGrpCat.{w})] |
| 32 | |
| 33 | variable {S : ShortComplex (Sheaf J AddCommGrpCat.{w})} (hS : S.ShortExact) |
| 34 | (n₀ n₁ : ℕ) (h : n₀ + 1 = n₁) |
| 35 | |
| 36 | namespace H |
| 37 | open _root_.CategoryTheory.Sheaf.H |
| 38 | |
| 39 | /-- The connecting map followed by the next cohomology map is zero. -/ |
| 40 | lemma longSequence_comp_zero₁ (x : H S.X₃ n₀) : |
| 41 | map S.f n₁ (δ hS n₀ n₁ h x) = 0 := by |
| 42 | change (x.comp hS.extClass h).comp (Ext.mk₀ S.f) (add_zero n₁) = 0 |
| 43 | simp only [Ext.comp_assoc_of_third_deg_zero, |
| 44 | ShortComplex.ShortExact.extClass_comp, Ext.comp_zero] |
| 45 | |
| 46 | /-- The previous cohomology map followed by the connecting map is zero. -/ |
| 47 | lemma longSequence_comp_zero₃ (x : H S.X₂ n₀) : |
| 48 | δ hS n₀ n₁ h (map S.g n₀ x) = 0 := by |
| 49 | change (x.comp (Ext.mk₀ S.g) (add_zero n₀)).comp hS.extClass h = 0 |
| 50 | simp only [Ext.comp_assoc_of_second_deg_zero, |
| 51 | ShortComplex.ShortExact.comp_extClass, Ext.comp_zero] |
| 52 | |
| 53 | /-- Consecutive cohomology maps induced by a short complex compose to zero. -/ |
| 54 | lemma longSequence_comp_zero₂ (n : ℕ) (x : H S.X₁ n) : |
| 55 | map S.g n (map S.f n x) = 0 := by |
| 56 | simp only [map_apply, Ext.comp_assoc_of_third_deg_zero, Ext.mk₀_comp_mk₀, |
| 57 | ShortComplex.zero, Ext.mk₀_zero, Ext.comp_zero] |
| 58 | |
| 59 | include hS in |
| 60 | /-- Elementwise exactness at the middle sheaf in a fixed degree. -/ |
| 61 | lemma longSequence_exact₂_explicit (n : ℕ) (x₂ : H S.X₂ n) (hx₂ : map S.g n x₂ = 0) : |
| 62 | ∃ x₁ : H S.X₁ n, map S.f n x₁ = x₂ := |
| 63 | Ext.covariant_sequence_exact₂ _ hS _ hx₂ |
| 64 | |
| 65 | include hS in |
| 66 | /-- In a short exact sequence, vanishing of the same cohomology degree at the |
| 67 | two ends implies vanishing at the middle. -/ |
| 68 | lemma subsingleton_H_X₂_of_shortExact (n : ℕ) |
| 69 | (hleft : Subsingleton (H S.X₁ n)) |
| 70 | (hright : Subsingleton (H S.X₃ n)) : |
| 71 | Subsingleton (H S.X₂ n) := by |
| 72 | let : Subsingleton (H S.X₁ n) := hleft |
| 73 | let : Subsingleton (H S.X₃ n) := hright |
| 74 | refine subsingleton_of_forall_eq 0 fun x ↦ ?_ |
| 75 | obtain ⟨x₁, hx₁⟩ := longSequence_exact₂_explicit hS n x (Subsingleton.elim _ _) |
| 76 | rw [Subsingleton.elim x₁ 0, map_zero] at hx₁ |
| 77 | exact hx₁.symm |
| 78 | |
| 79 | /-- Elementwise exactness before the connecting homomorphism. -/ |
| 80 | lemma longSequence_exact₃_explicit (x₃ : H S.X₃ n₀) (hx₃ : δ hS n₀ n₁ h x₃ = 0) : |
| 81 | ∃ x₂ : H S.X₂ n₀, map S.g n₀ x₂ = x₃ := |
| 82 | Ext.covariant_sequence_exact₃ _ _ _ h hx₃ |
| 83 | |
| 84 | /-- Elementwise exactness after the connecting homomorphism. -/ |
| 85 | lemma longSequence_exact₁_explicit (x₁ : H S.X₁ n₁) (hx₁ : map S.f n₁ x₁ = 0) : |
| 86 | ∃ x₃ : H S.X₃ n₀, δ hS n₀ n₁ h x₃ = x₁ := |
| 87 | Ext.covariant_sequence_exact₁ _ _ _ hx₁ h |
| 88 | |
| 89 | include hS in |
| 90 | /-- In a short exact sequence, vanishing of `H^q` of the right term and |
| 91 | `H^(q+1)` of the middle term implies vanishing of `H^(q+1)` of the left |
| 92 | term. -/ |
| 93 | lemma subsingleton_H_X₁_succ_of_shortExact (q : ℕ) |
| 94 | (hright : Subsingleton (H S.X₃ q)) |
| 95 | (hmiddle : Subsingleton (H S.X₂ (q + 1))) : |
| 96 | Subsingleton (H S.X₁ (q + 1)) := by |
| 97 | let : Subsingleton (H S.X₃ q) := hright |
| 98 | let : Subsingleton (H S.X₂ (q + 1)) := hmiddle |
| 99 | refine subsingleton_of_forall_eq 0 fun x ↦ ?_ |
| 100 | obtain ⟨x₃, hx₃⟩ := longSequence_exact₁_explicit |
| 101 | hS q (q + 1) rfl x (Subsingleton.elim _ _) |
| 102 | rw [Subsingleton.elim x₃ 0, map_zero] at hx₃ |
| 103 | exact hx₃.symm |
| 104 | |
| 105 | include hS in |
| 106 | /-- In a short exact sequence, surjectivity on `H^q` from the middle to the |
| 107 | right and vanishing of `H^(q+1)` of the middle imply vanishing of |
| 108 | `H^(q+1)` of the left term. -/ |
| 109 | lemma subsingleton_H_X₁_succ_of_shortExact_of_surjective (q : ℕ) |
| 110 | (hsurj : Function.Surjective (map S.g q)) |
| 111 | (hmiddle : Subsingleton (H S.X₂ (q + 1))) : |
| 112 | Subsingleton (H S.X₁ (q + 1)) := by |
| 113 | let : Subsingleton (H S.X₂ (q + 1)) := hmiddle |
| 114 | refine subsingleton_of_forall_eq 0 fun x ↦ ?_ |
| 115 | obtain ⟨x₃, hx₃⟩ := longSequence_exact₁_explicit |
| 116 | hS q (q + 1) rfl x (Subsingleton.elim _ _) |
| 117 | obtain ⟨x₂, hx₂⟩ := hsurj x₃ |
| 118 | rw [← hx₃, ← hx₂, longSequence_comp_zero₃] |
| 119 | |
| 120 | variable {T : C} (hT : Limits.IsTerminal T) |
| 121 | |
| 122 | open Opposite |
| 123 | |
| 124 | include hS hT in |
| 125 | /-- Degree-zero exactness at the middle sheaf, expressed using sections over |
| 126 | a terminal object. -/ |
| 127 | lemma longSequence_equiv₀_exact₂ (x₂ : S.X₂.obj.obj (op T)) |
| 128 | (hx₂ : S.g.hom.app (op T) x₂ = 0) : |
| 129 | ∃ x₁ : S.X₁.obj.obj (op T), S.f.hom.app (op T) x₁ = x₂ := by |
| 130 | let y₂ := (equiv₀ S.X₂ hT).symm x₂ |
| 131 | have hy₂ : map S.g 0 y₂ = 0 := by |
| 132 | rw [equiv₀_symm_naturality, hx₂] |
| 133 | exact map_zero _ |
| 134 | obtain ⟨y₁, hy₁⟩ := longSequence_exact₂_explicit hS 0 y₂ hy₂ |
| 135 | refine ⟨equiv₀ S.X₁ hT y₁, ?_⟩ |
| 136 | rw [equiv₀_naturality, hy₁] |
| 137 | simp [y₂] |
| 138 | |
| 139 | include hS hT in |
| 140 | /-- If `H¹` of the first sheaf vanishes, the map on terminal-object |
| 141 | sections is surjective. -/ |
| 142 | lemma longSequence_surjective_of_subsingleton_H |
| 143 | [Subsingleton (S.X₁.H 1)] : |
| 144 | Function.Surjective (S.g.hom.app (op T)) := |
| 145 | fun x₃ ↦ longSequence_equiv₀_exact₃ hS hT x₃ |
| 146 | (Subsingleton.elim _ _) |
| 147 | |
| 148 | end H |
| 149 | |
| 150 | end OAI.AlgebraicGeometry.SheafCohomology.Exact.CategoryTheory.Sheaf |