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.Basic |
| 9 | |
| 10 | /-! # Cohomology Exact -/ |
| 11 | |
| 12 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Sheaf.CohomologyExact.SheafCohomologyExact |
| 13 | |
| 14 | /-! |
| 15 | # Exact sequences in sheaf cohomology |
| 16 | |
| 17 | This file contains the option-free core of Mathlib PR #36218. For a short |
| 18 | exact sequence of additive sheaves, it constructs the connecting morphism and |
| 19 | the associated six-term window of the long exact sequence, together with |
| 20 | elementwise exactness lemmas. |
| 21 | |
| 22 | This is a source-preserving Apache-2.0 port of AINTLIB's |
| 23 | `ForMathlib/SheafCohomologyExact.lean`. |
| 24 | -/ |
| 25 | |
| 26 | open _root_.CategoryTheory Abelian _root_.AddCommGrpCat |
| 27 | |
| 28 | universe w' w v u |
| 29 | |
| 30 | open _root_.CategoryTheory.Sheaf _root_.CategoryTheory.Sheaf.H |
| 31 | |
| 32 | variable {C : Type u} [Category.{v} C] {J : GrothendieckTopology C} |
| 33 | [HasSheafify J AddCommGrpCat.{w}] [HasExt.{w'} (Sheaf J AddCommGrpCat.{w})] |
| 34 | |
| 35 | variable {S : ShortComplex (Sheaf J AddCommGrpCat.{w})} (hS : S.ShortExact) |
| 36 | (n₀ n₁ : ℕ) (h : n₀ + 1 = n₁) |
| 37 | |
| 38 | namespace Cohomology |
| 39 | |
| 40 | /-- The connecting homomorphism in the long exact sequence of sheaf |
| 41 | cohomology. -/ |
| 42 | noncomputable def δ : H S.X₃ n₀ →+ H S.X₁ n₁ := |
| 43 | hS.extClass.postcomp _ h |
| 44 | |
| 45 | variable {S₁ S₂ : ShortComplex (Sheaf J AddCommGrpCat.{w})} |
| 46 | (h₁ : S₁.ShortExact) (h₂ : S₂.ShortExact) (f : S₁ ⟶ S₂) |
| 47 | |
| 48 | /-- Naturality of the connecting homomorphism. -/ |
| 49 | theorem δ_naturality (x : H S₁.X₃ n₀) : |
| 50 | δ h₂ n₀ n₁ h (map f.τ₃ n₀ x) = map f.τ₁ n₁ (δ h₁ n₀ n₁ h x) := by |
| 51 | delta δ H map |
| 52 | simp [ShortComplex.ShortExact.extClass_naturality h₁ h₂ f] |
| 53 | |
| 54 | /-- A six-term window of the long exact sequence of sheaf cohomology. -/ |
| 55 | noncomputable abbrev longSequence (h : n₀ + 1 = n₁ := by omega) : |
| 56 | ComposableArrows AddCommGrpCat.{w'} 5 := |
| 57 | ComposableArrows.mk₅ |
| 58 | (ofHom (map S.f n₀)) |
| 59 | (ofHom (map S.g n₀)) |
| 60 | (ofHom (δ hS n₀ n₁ h)) |
| 61 | (ofHom (map S.f n₁)) |
| 62 | (ofHom (map S.g n₁)) |
| 63 | |
| 64 | /-- Exactness of the six-term window in sheaf cohomology. -/ |
| 65 | theorem longSequence_exact : (longSequence hS n₀ n₁ h).Exact := |
| 66 | Ext.covariantSequence_exact _ hS n₀ n₁ h |
| 67 | |
| 68 | /-- The connecting map followed by the next cohomology map is zero. -/ |
| 69 | lemma longSequence_comp_zero₁ (x : H S.X₃ n₀) : |
| 70 | map S.f n₁ (δ hS n₀ n₁ h x) = 0 := by |
| 71 | change (x.comp hS.extClass h).comp (Ext.mk₀ S.f) (add_zero n₁) = 0 |
| 72 | simp only [Ext.comp_assoc_of_third_deg_zero, |
| 73 | ShortComplex.ShortExact.extClass_comp, Ext.comp_zero] |
| 74 | |
| 75 | /-- The previous cohomology map followed by the connecting map is zero. -/ |
| 76 | lemma longSequence_comp_zero₃ (x : H S.X₂ n₀) : |
| 77 | δ hS n₀ n₁ h (map S.g n₀ x) = 0 := by |
| 78 | change (x.comp (Ext.mk₀ S.g) (add_zero n₀)).comp hS.extClass h = 0 |
| 79 | simp only [Ext.comp_assoc_of_second_deg_zero, |
| 80 | ShortComplex.ShortExact.comp_extClass, Ext.comp_zero] |
| 81 | |
| 82 | /-- Consecutive cohomology maps induced by a short complex compose to zero. -/ |
| 83 | lemma longSequence_comp_zero₂ (n : ℕ) (x : H S.X₁ n) : |
| 84 | map S.g n (map S.f n x) = 0 := by |
| 85 | simp only [map_apply, Ext.comp_assoc_of_third_deg_zero, Ext.mk₀_comp_mk₀, |
| 86 | ShortComplex.zero, Ext.mk₀_zero, Ext.comp_zero] |
| 87 | |
| 88 | include hS in |
| 89 | /-- Elementwise exactness at the middle sheaf in a fixed degree. -/ |
| 90 | lemma longSequence_exact₂_explicit (n : ℕ) (x₂ : H S.X₂ n) (hx₂ : map S.g n x₂ = 0) : |
| 91 | ∃ x₁ : H S.X₁ n, map S.f n x₁ = x₂ := |
| 92 | Ext.covariant_sequence_exact₂ _ hS _ hx₂ |
| 93 | |
| 94 | include hS in |
| 95 | /-- In a short exact sequence, vanishing of the same cohomology degree at the |
| 96 | two ends implies vanishing at the middle. -/ |
| 97 | lemma subsingleton_H_X₂_of_shortExact (n : ℕ) |
| 98 | (hleft : Subsingleton (H S.X₁ n)) |
| 99 | (hright : Subsingleton (H S.X₃ n)) : |
| 100 | Subsingleton (H S.X₂ n) := by |
| 101 | let : Subsingleton (H S.X₁ n) := hleft |
| 102 | let : Subsingleton (H S.X₃ n) := hright |
| 103 | refine subsingleton_of_forall_eq 0 fun x ↦ ?_ |
| 104 | obtain ⟨x₁, hx₁⟩ := longSequence_exact₂_explicit hS n x (Subsingleton.elim _ _) |
| 105 | rw [Subsingleton.elim x₁ 0, map_zero] at hx₁ |
| 106 | exact hx₁.symm |
| 107 | |
| 108 | /-- Elementwise exactness before the connecting homomorphism. -/ |
| 109 | lemma longSequence_exact₃_explicit (x₃ : H S.X₃ n₀) (hx₃ : δ hS n₀ n₁ h x₃ = 0) : |
| 110 | ∃ x₂ : H S.X₂ n₀, map S.g n₀ x₂ = x₃ := |
| 111 | Ext.covariant_sequence_exact₃ _ _ _ h hx₃ |
| 112 | |
| 113 | /-- Elementwise exactness after the connecting homomorphism. -/ |
| 114 | lemma longSequence_exact₁_explicit (x₁ : H S.X₁ n₁) (hx₁ : map S.f n₁ x₁ = 0) : |
| 115 | ∃ x₃ : H S.X₃ n₀, δ hS n₀ n₁ h x₃ = x₁ := |
| 116 | Ext.covariant_sequence_exact₁ _ _ _ hx₁ h |
| 117 | |
| 118 | include hS in |
| 119 | /-- In a short exact sequence, vanishing of `H^q` of the right term and |
| 120 | `H^(q+1)` of the middle term implies vanishing of `H^(q+1)` of the left |
| 121 | term. -/ |
| 122 | lemma subsingleton_H_X₁_succ_of_shortExact (q : ℕ) |
| 123 | (hright : Subsingleton (H S.X₃ q)) |
| 124 | (hmiddle : Subsingleton (H S.X₂ (q + 1))) : |
| 125 | Subsingleton (H S.X₁ (q + 1)) := by |
| 126 | let : Subsingleton (H S.X₃ q) := hright |
| 127 | let : Subsingleton (H S.X₂ (q + 1)) := hmiddle |
| 128 | refine subsingleton_of_forall_eq 0 fun x ↦ ?_ |
| 129 | obtain ⟨x₃, hx₃⟩ := longSequence_exact₁_explicit |
| 130 | hS q (q + 1) rfl x (Subsingleton.elim _ _) |
| 131 | rw [Subsingleton.elim x₃ 0, map_zero] at hx₃ |
| 132 | exact hx₃.symm |
| 133 | |
| 134 | include hS in |
| 135 | /-- In a short exact sequence, surjectivity on `H^q` from the middle to the |
| 136 | right and vanishing of `H^(q+1)` of the middle imply vanishing of |
| 137 | `H^(q+1)` of the left term. -/ |
| 138 | lemma subsingleton_H_X₁_succ_of_shortExact_of_surjective (q : ℕ) |
| 139 | (hsurj : Function.Surjective (map S.g q)) |
| 140 | (hmiddle : Subsingleton (H S.X₂ (q + 1))) : |
| 141 | Subsingleton (H S.X₁ (q + 1)) := by |
| 142 | let : Subsingleton (H S.X₂ (q + 1)) := hmiddle |
| 143 | refine subsingleton_of_forall_eq 0 fun x ↦ ?_ |
| 144 | obtain ⟨x₃, hx₃⟩ := longSequence_exact₁_explicit |
| 145 | hS q (q + 1) rfl x (Subsingleton.elim _ _) |
| 146 | obtain ⟨x₂, hx₂⟩ := hsurj x₃ |
| 147 | rw [← hx₃, ← hx₂, longSequence_comp_zero₃] |
| 148 | |
| 149 | variable {T : C} (hT : Limits.IsTerminal T) |
| 150 | |
| 151 | open Opposite |
| 152 | |
| 153 | include hS hT in |
| 154 | /-- Degree-zero exactness at the middle sheaf, expressed using sections over |
| 155 | a terminal object. -/ |
| 156 | lemma longSequence_equiv₀_exact₂ (x₂ : S.X₂.obj.obj (op T)) |
| 157 | (hx₂ : S.g.hom.app (op T) x₂ = 0) : |
| 158 | ∃ x₁ : S.X₁.obj.obj (op T), S.f.hom.app (op T) x₁ = x₂ := by |
| 159 | let y₂ := (equiv₀ S.X₂ hT).symm x₂ |
| 160 | have hy₂ : map S.g 0 y₂ = 0 := by |
| 161 | rw [equiv₀_symm_naturality, hx₂] |
| 162 | exact map_zero _ |
| 163 | obtain ⟨y₁, hy₁⟩ := longSequence_exact₂_explicit hS 0 y₂ hy₂ |
| 164 | refine ⟨equiv₀ S.X₁ hT y₁, ?_⟩ |
| 165 | rw [equiv₀_naturality, hy₁] |
| 166 | simp [y₂] |
| 167 | |
| 168 | /-- Degree-zero exactness expressed using sections over a terminal object. -/ |
| 169 | lemma longSequence_equiv₀_exact₃ (x₃ : S.X₃.obj.obj (op T)) |
| 170 | (hx₃ : δ hS 0 1 rfl ((equiv₀ S.X₃ hT).symm x₃) = 0) : |
| 171 | ∃ x₂ : S.X₂.obj.obj (op T), S.g.hom.app (op T) x₂ = x₃ := by |
| 172 | obtain ⟨x₂, hx₂⟩ := longSequence_exact₃_explicit hS 0 1 rfl |
| 173 | ((equiv₀ S.X₃ hT).symm x₃) hx₃ |
| 174 | exact ⟨equiv₀ S.X₂ hT x₂, by simp [equiv₀_naturality, hx₂]⟩ |
| 175 | |
| 176 | include hS hT in |
| 177 | /-- If `H¹` of the first sheaf vanishes, the map on terminal-object |
| 178 | sections is surjective. -/ |
| 179 | lemma longSequence_surjective_of_subsingleton_H |
| 180 | [Subsingleton (S.X₁.H 1)] : |
| 181 | Function.Surjective (S.g.hom.app (op T)) := |
| 182 | fun x₃ ↦ longSequence_equiv₀_exact₃ hS hT x₃ |
| 183 | (Subsingleton.elim _ _) |
| 184 | |
| 185 | end Cohomology |
| 186 | |
| 187 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Sheaf.CohomologyExact.SheafCohomologyExact |