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 |
| 2 | import OAI.AlgebraicGeometry.SheafCohomology.ClosedImmersion |
| 3 | |
| 4 | /-! # API -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.SheafCohomology.API |
| 7 | |
| 8 | open _root_.CategoryTheory _root_.TopologicalSpace _root_.Order |
| 9 | open _root_.CategoryTheory.Limits _root_.Opposite |
| 10 | |
| 11 | set_option backward.isDefEq.respectTransparency false |
| 12 | |
| 13 | namespace ProjectiveVanishing |
| 14 | |
| 15 | open OAI.AlgebraicGeometry.SheafCohomology.Vanishing.Projective.TopCat |
| 16 | |
| 17 | /-! |
| 18 | # Sheaf Cohomology API |
| 19 | |
| 20 | Centralizes results about sheaf cohomology `Sheaf.H`, keeping the underlying `Ext` |
| 21 | calculations internal so downstream files never need to unfold `Sheaf.H` directly. |
| 22 | |
| 23 | ## Main results |
| 24 | |
| 25 | * `subsingleton_sheafH_of_shortExact_middle`: middle-term cohomology vanishing |
| 26 | * `sheafH_subsingleton_of_isEmpty`: empty-space vanishing |
| 27 | * `sheaf_isZero_of_zero_stalks`: zero stalks imply zero sheaf |
| 28 | * `sheafH_subsingleton_of_isZero`: bundled zero-sheaf vanishing |
| 29 | * `stalk_zero_of_ses_g_iso`: stalk vanishing from SES with iso on `g` |
| 30 | * `stalk_zero_of_shortExact_kernel`: stalk vanishing from SES kernel |
| 31 | * `stalk_zero_of_g_is_cokernel_of_stalk_epi`: sheaf-level stalk |
| 32 | vanishing from a cokernel and stalk-epi hypothesis |
| 33 | * `cokernel_stalk_zero_of_stalk_surj`: actual-cokernel specialization of the same stalk |
| 34 | vanishing under stalk-surjectivity |
| 35 | * `sheafH_succ_map`: successor connecting morphism |
| 36 | * `sheafH_succ_map_exists_preimage_of_subsingleton_middle`: successor-map |
| 37 | preimage wrapper |
| 38 | * `sheafH0EquivSections`: sheaf-level wrapper for `H^0(F) ≃+ F(⊤)` |
| 39 | * `sheafH0EquivSections_natural`: sheaf-level naturality of the above |
| 40 | * `sheafH1_cokernel_iso_of_subsingleton_middle`: sheaf-level form of the |
| 41 | `H¹` cokernel identification |
| 42 | * `sheafH1_cokernel_iso_of_subsingleton_middle_natural`: sheaf-level |
| 43 | naturality for the same `H¹` cokernel identification |
| 44 | * `sheafH_succ_iso_of_subsingleton_middle`: sheaf-level form of the |
| 45 | higher-degree connecting isomorphism |
| 46 | * `sheafH_succ_iso_of_subsingleton_middle_natural`: sheaf-level |
| 47 | naturality for the same connecting isomorphism |
| 48 | * `sheafH0_surj_of_epi_app_top`: sheaf-level surjectivity on top sections |
| 49 | gives H^0 surjectivity |
| 50 | * `sheafH_subsingleton_H1_via_surj`: sheaf-level H^1 vanishing via |
| 51 | H^0-surjectivity |
| 52 | * `sheafH_subsingleton_H1_via_epi_app_top`: sheaf-level H^1 vanishing via |
| 53 | surjective top sections |
| 54 | * `sheafH_subsingleton_of_injective`: positive-degree cohomology of an injective sheaf |
| 55 | is subsingleton |
| 56 | * `sheafH_subsingleton_H1_of_injective_of_epi_app_top`: sheaf-level |
| 57 | injective-middle-term `H¹` vanishing |
| 58 | * `sheafH_dimension_shift_of_both`: sheaf-level forward dimension shift |
| 59 | for short exact sequences |
| 60 | * `sheafH_dimension_shift_of_mono`: forward dimension shift for a monomorphism |
| 61 | * `sheafH_dimension_shift_of_injective`: forward dimension shift with injective middle term |
| 62 | * `sheafH_dimension_shift_X₃_of_locallySurjective`: reverse dimension shift for locally |
| 63 | surjective morphisms |
| 64 | -/ |
| 65 | |
| 66 | universe w' w v u |
| 67 | |
| 68 | open Abelian Limits |
| 69 | |
| 70 | instance : HasSeparator AddCommGrpCat.{u} where |
| 71 | hasSeparator := by |
| 72 | use AddCommGrpCat.of (ULift ℤ) |
| 73 | intro A B f g h |
| 74 | simp_all only [ObjectProperty.singleton_iff, AddCommGrpCat.ext_iff, |
| 75 | AddCommGrpCat.hom_comp, AddMonoidHom.coe_comp, Function.comp_apply, forall_eq', |
| 76 | ULift.forall] |
| 77 | intro x |
| 78 | specialize h (AddCommGrpCat.ofHom |
| 79 | (AddMonoidHom.mk' (fun y ↦ y • x) fun y z ↦ by simp only [add_smul])) 1 |
| 80 | aesop |
| 81 | |
| 82 | instance : IsGrothendieckAbelian.{u} AddCommGrpCat.{u} where |
| 83 | |
| 84 | instance (X : TopCat.{u}) : IsGrothendieckAbelian.{u} (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) := |
| 85 | inferInstanceAs (IsGrothendieckAbelian (CategoryTheory.Sheaf _ _)) |
| 86 | |
| 87 | instance {C : Type*} [Category C] {D : Type*} [Category D] [Preadditive D] : |
| 88 | (Functor.const Cᵒᵖ : D ⥤ Cᵒᵖ ⥤ D).Additive where |
| 89 | |
| 90 | instance {C : Type*} [Category C] [Preadditive C] {X : TopCat.{u}} : |
| 91 | Preadditive (TopCat.Presheaf C X) := by |
| 92 | delta TopCat.Presheaf |
| 93 | infer_instance |
| 94 | |
| 95 | instance {X : TopCat.{u}} : |
| 96 | (constantSheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}).Additive := |
| 97 | inferInstanceAs ((Functor.const (Opens X)ᵒᵖ ⋙ |
| 98 | presheafToSheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}).Additive) |
| 99 | |
| 100 | noncomputable instance sheafHasExt (X : TopCat.{u}) : |
| 101 | HasExt.{u} (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) := |
| 102 | hasExt_of_enoughInjectives _ |
| 103 | |
| 104 | /-- Stalks preserve monomorphisms in the native site-sheaf category. -/ |
| 105 | instance nativeSheafStalk_preservesMonos (X : TopCat.{u}) (x : X) : |
| 106 | (Vanishing.Projective.TopCat.Sheaf.forget AddCommGrpCat.{u} X ⋙ |
| 107 | _root_.TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).PreservesMonomorphisms where |
| 108 | preserves {F G} f hf := by |
| 109 | apply (AddCommGrpCat.mono_iff_injective _).mpr |
| 110 | apply _root_.TopCat.Presheaf.stalkFunctor_map_injective_of_app_injective (f := f.hom) |
| 111 | intro U |
| 112 | apply (AddCommGrpCat.mono_iff_injective _).mp |
| 113 | have hmono : Mono f.hom := |
| 114 | (Sheaf.Hom.mono_iff_presheaf_mono |
| 115 | (J := Opens.grothendieckTopology X) (D := AddCommGrpCat.{u}) f).mp hf |
| 116 | exact (NatTrans.mono_iff_mono_app f.hom).mp hmono (op U) |
| 117 | |
| 118 | /-! ## Internal Ext helpers -/ |
| 119 | |
| 120 | section ExtDimShift |
| 121 | variable {C' : Type*} [Category C'] [Abelian C'] [HasExt C'] |
| 122 | |
| 123 | /-- Dimension shift for Ext via LES: given `0 → X₁ → X₂ → X₃ → 0` short exact, |
| 124 | `Ext^n(Z, X₃) = 0` and `Ext^{n+1}(Z, X₂) = 0` imply `Ext^{n+1}(Z, X₁) = 0`. -/ |
| 125 | private theorem ext_dimension_shift (Z : C') {S : ShortComplex C'} (hS : S.ShortExact) (n : ℕ) |
| 126 | (h₃ : Subsingleton (Ext Z S.X₃ n)) |
| 127 | (h₂ : Subsingleton (Ext Z S.X₂ (n + 1))) : |
| 128 | Subsingleton (Ext Z S.X₁ (n + 1)) := by |
| 129 | constructor; intro a b |
| 130 | obtain ⟨c, hc⟩ := Ext.covariant_sequence_exact₁ _ hS a (@Subsingleton.elim _ h₂ _ _) rfl |
| 131 | obtain ⟨d, hd⟩ := Ext.covariant_sequence_exact₁ _ hS b (@Subsingleton.elim _ h₂ _ _) rfl |
| 132 | rw [← hc, ← hd, @Subsingleton.elim _ h₃ c d] |
| 133 | |
| 134 | /-- Reverse dimension shift: `Ext^n(Z, X₂) = 0` and `Ext^{n+1}(Z, X₁) = 0` imply |
| 135 | `Ext^n(Z, X₃) = 0`. Uses exactness at X₃ in the covariant LES. -/ |
| 136 | private theorem ext_dimension_shift_X₃ (Z : C') {S : ShortComplex C'} (hS : S.ShortExact) (n : ℕ) |
| 137 | (h₂ : Subsingleton (Ext Z S.X₂ n)) |
| 138 | (h₁ : Subsingleton (Ext Z S.X₁ (n + 1))) : |
| 139 | Subsingleton (Ext Z S.X₃ n) := by |
| 140 | constructor; intro a b |
| 141 | obtain ⟨c, hc⟩ := Ext.covariant_sequence_exact₃ _ hS a rfl (@Subsingleton.elim _ h₁ _ _) |
| 142 | obtain ⟨d, hd⟩ := Ext.covariant_sequence_exact₃ _ hS b rfl (@Subsingleton.elim _ h₁ _ _) |
| 143 | rw [← hc, ← hd, @Subsingleton.elim _ h₂ c d] |
| 144 | |
| 145 | /-- If the middle cohomology groups in degrees `n` and `n + 1` are subsingleton, then the |
| 146 | connecting morphism `Ext^n(Z, X₃) → Ext^(n+1)(Z, X₁)` is bijective. -/ |
| 147 | private theorem extClass_postcomp_bijective_of_subsingleton_middle |
| 148 | (Z : C') {S : ShortComplex C'} (hS : S.ShortExact) (n : ℕ) |
| 149 | (h₂n : Subsingleton (Ext Z S.X₂ n)) |
| 150 | (h₂succ : Subsingleton (Ext Z S.X₂ (n + 1))) : |
| 151 | Function.Bijective (hS.extClass.postcomp Z (rfl : n + 1 = n + 1)) := by |
| 152 | refine ⟨?_, ?_⟩ |
| 153 | · intro x y hxy |
| 154 | have hzero : (x - y).comp hS.extClass rfl = 0 := by |
| 155 | change (hS.extClass.postcomp Z (rfl : n + 1 = n + 1)) (x - y) = 0 |
| 156 | rw [map_sub, hxy, sub_self] |
| 157 | obtain ⟨z, hz⟩ := Ext.covariant_sequence_exact₃ Z hS (x - y) rfl hzero |
| 158 | have hz0 : z = 0 := Subsingleton.elim _ _ |
| 159 | apply sub_eq_zero.mp |
| 160 | rw [← hz, hz0, Ext.zero_comp] |
| 161 | · intro x |
| 162 | obtain ⟨y, hy⟩ := Ext.covariant_sequence_exact₁ Z hS x |
| 163 | (@Subsingleton.elim _ h₂succ _ _) rfl |
| 164 | exact ⟨y, hy⟩ |
| 165 | |
| 166 | /-- The connecting morphism in the covariant long exact sequence as an additive equivalence, |
| 167 | assuming the middle cohomology groups in degrees `n` and `n + 1` vanish. -/ |
| 168 | private noncomputable def extClass_postcompAddEquiv_of_subsingleton_middle |
| 169 | (Z : C') {S : ShortComplex C'} (hS : S.ShortExact) (n : ℕ) |
| 170 | (h₂n : Subsingleton (Ext Z S.X₂ n)) |
| 171 | (h₂succ : Subsingleton (Ext Z S.X₂ (n + 1))) : |
| 172 | Ext Z S.X₃ n ≃+ Ext Z S.X₁ (n + 1) := |
| 173 | AddEquiv.ofBijective (hS.extClass.postcomp Z (rfl : n + 1 = n + 1)) |
| 174 | (extClass_postcomp_bijective_of_subsingleton_middle Z hS n h₂n h₂succ) |
| 175 | |
| 176 | /-- Naturality of the extension class: given a morphism `φ: S₁ ⟶ S₂` of short exact sequences, |
| 177 | the connecting homomorphism commutes with the induced maps on Ext groups. |
| 178 | Proved via the triangulated category axiom TR3 (`complete_distinguished_triangle_morphism₁`), |
| 179 | fullness/faithfulness of `singleFunctor`, and mono cancellation. -/ |
| 180 | private lemma extClass_naturality {S₁ S₂ : ShortComplex C'} (hS₁ : S₁.ShortExact) |
| 181 | (hS₂ : S₂.ShortExact) (φ : S₁ ⟶ S₂) : |
| 182 | (Ext.mk₀ φ.τ₃).comp hS₂.extClass (zero_add 1) = |
| 183 | hS₁.extClass.comp (Ext.mk₀ φ.τ₁) (add_zero 1) := by |
| 184 | let := HasDerivedCategory.standard C' |
| 185 | ext |
| 186 | simp only [Ext.comp_hom, Ext.mk₀_hom, ShortComplex.ShortExact.extClass_hom] |
| 187 | rw [ShiftedHom.mk₀_comp, ShiftedHom.comp_mk₀] |
| 188 | have comm₂ : hS₁.singleTriangle.mor₂ ≫ (DerivedCategory.singleFunctor C' 0).map φ.τ₃ = |
| 189 | (DerivedCategory.singleFunctor C' 0).map φ.τ₂ ≫ hS₂.singleTriangle.mor₂ := by |
| 190 | show (DerivedCategory.singleFunctor C' 0).map S₁.g ≫ |
| 191 | (DerivedCategory.singleFunctor C' 0).map φ.τ₃ = |
| 192 | (DerivedCategory.singleFunctor C' 0).map φ.τ₂ ≫ |
| 193 | (DerivedCategory.singleFunctor C' 0).map S₂.g |
| 194 | simp [← Functor.map_comp, φ.comm₂₃] |
| 195 | obtain ⟨a', ha₁, ha₃⟩ := Pretriangulated.complete_distinguished_triangle_morphism₁ |
| 196 | hS₁.singleTriangle hS₂.singleTriangle |
| 197 | hS₁.singleTriangle_distinguished hS₂.singleTriangle_distinguished |
| 198 | ((DerivedCategory.singleFunctor C' 0).map φ.τ₂) |
| 199 | ((DerivedCategory.singleFunctor C' 0).map φ.τ₃) comm₂ |
| 200 | simp only [ShortComplex.ShortExact.singleTriangle_mor₃] at ha₃ |
| 201 | rw [← ha₃] |
| 202 | suffices a' = (DerivedCategory.singleFunctor C' 0).map φ.τ₁ by rw [this]; simp |
| 203 | obtain ⟨a'', rfl⟩ := (DerivedCategory.singleFunctor C' 0).map_surjective a' |
| 204 | congr 1 |
| 205 | have h : S₁.f ≫ φ.τ₂ = a'' ≫ S₂.f := by |
| 206 | have := ha₁ |
| 207 | simp only [ShortComplex.ShortExact.singleTriangle_mor₁] at this |
| 208 | rwa [← Functor.map_comp, ← Functor.map_comp, |
| 209 | (DerivedCategory.singleFunctor C' 0).map_injective.eq_iff] at this |
| 210 | have : Mono S₂.f := hS₂.mono_f |
| 211 | exact (cancel_mono S₂.f).mp (by rw [← φ.comm₁₂.symm, h]) |
| 212 | |
| 213 | /-- Internal helper: if `Y` is zero in an abelian category, `Ext X Y n` is subsingleton |
| 214 | for all `X`, `n`. |
| 215 | Proof: `𝟙 Y = 0` because `Y` is zero, so `x = x ∘ mk₀(𝟙 Y) = x ∘ mk₀(0) = x ∘ 0 = 0`. -/ |
| 216 | private theorem ext_subsingleton_of_isZero_tgt {X Y : C'} (hY : IsZero Y) (n : ℕ) : |
| 217 | Subsingleton (Ext X Y n) := |
| 218 | ⟨fun a b ↦ by |
| 219 | have eq : ∀ x : Ext X Y n, x = 0 := fun x ↦ by |
| 220 | have h := Ext.comp_mk₀_id x |
| 221 | rw [show (𝟙 Y : Y ⟶ Y) = 0 from hY.eq_of_src _ _, Ext.mk₀_zero] at h |
| 222 | exact h.symm.trans (Ext.comp_zero x Y 0 n (add_zero n)) |
| 223 | exact (eq a).trans (eq b).symm⟩ |
| 224 | |
| 225 | end ExtDimShift |
| 226 | |
| 227 | /-! ## Stalks and zero sheaves -/ |
| 228 | |
| 229 | /-- Naturality of the connecting map on sheaf cohomology for a morphism of short exact |
| 230 | sequences, with the associativity rewrites needed for nested `comp` expressions. -/ |
| 231 | private theorem sheafH_comp_extClass_naturality {X : TopCat.{u}} |
| 232 | {S₁ S₂ : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 233 | (hS₁ : S₁.ShortExact) (hS₂ : S₂.ShortExact) (φ : S₁ ⟶ S₂) (n : ℕ) |
| 234 | (y : Sheaf.H S₁.X₃ n) : |
| 235 | (y.comp hS₁.extClass rfl).comp (Ext.mk₀ φ.τ₁) (add_zero (n + 1)) = |
| 236 | (y.comp (Ext.mk₀ φ.τ₃) (add_zero n)).comp hS₂.extClass rfl := by |
| 237 | have hcomp : |
| 238 | y.comp (hS₁.extClass.comp (Ext.mk₀ φ.τ₁) (add_zero 1)) rfl = |
| 239 | y.comp ((Ext.mk₀ φ.τ₃).comp hS₂.extClass (zero_add 1)) rfl := by |
| 240 | exact congrArg (fun t ↦ y.comp t rfl) (extClass_naturality hS₁ hS₂ φ).symm |
| 241 | simpa [Ext.comp_assoc_of_third_deg_zero, Ext.comp_assoc_of_second_deg_zero] using hcomp |
| 242 | |
| 243 | /-- Successor connecting morphism attached to a short exact sequence of sheaves. -/ |
| 244 | noncomputable def sheafH_succ_map {X : TopCat.{u}} |
| 245 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 246 | (hS : S.ShortExact) |
| 247 | (n : ℕ) : |
| 248 | AddCommGrpCat.of (Sheaf.H S.X₃ n) ⟶ AddCommGrpCat.of (Sheaf.H S.X₁ (n + 1)) := by |
| 249 | exact AddCommGrpCat.ofHom <| |
| 250 | AddMonoidHom.mk' |
| 251 | (fun y ↦ y.comp hS.extClass rfl) |
| 252 | (by |
| 253 | intro a b |
| 254 | change (a + b).comp hS.extClass rfl = a.comp hS.extClass rfl + b.comp hS.extClass rfl |
| 255 | rw [Ext.add_comp]) |
| 256 | |
| 257 | private theorem sheafH_succ_map_apply {X : TopCat.{u}} |
| 258 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 259 | (hS : S.ShortExact) |
| 260 | (n : ℕ) |
| 261 | (y : Sheaf.H S.X₃ n) : |
| 262 | ConcreteCategory.hom (sheafH_succ_map hS n) y = y.comp hS.extClass rfl := rfl |
| 263 | |
| 264 | /-- If the middle term has subsingleton cohomology in degree `n + 1`, every |
| 265 | `H^(n+1)(S.X₁)` class comes from some `H^n(S.X₃)` class via the successor map. -/ |
| 266 | theorem sheafH_succ_map_exists_preimage_of_subsingleton_middle {X : TopCat.{u}} |
| 267 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 268 | (hS : S.ShortExact) |
| 269 | (n : ℕ) |
| 270 | (h₂H : Subsingleton (Sheaf.H S.X₂ (n + 1))) |
| 271 | (x : Sheaf.H S.X₁ (n + 1)) : |
| 272 | ∃ y : Sheaf.H S.X₃ n, ConcreteCategory.hom (sheafH_succ_map hS n) y = x := by |
| 273 | obtain ⟨y, hy⟩ := Ext.covariant_sequence_exact₁ _ hS x (@Subsingleton.elim _ h₂H _ _) rfl |
| 274 | refine ⟨y, ?_⟩ |
| 275 | rw [sheafH_succ_map_apply] |
| 276 | exact hy |
| 277 | |
| 278 | theorem sheaf_isZero_of_zero_stalks (X : TopCat.{u}) |
| 279 | {F : TopCat.Presheaf AddCommGrpCat.{u} X} (hF : F.IsSheaf) |
| 280 | (hstalk : ∀ (x : X) |
| 281 | (a : (TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).obj F), a = 0) : |
| 282 | IsZero ((⟨F, hF⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)) := by |
| 283 | let Fsh : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X := ⟨F, hF⟩ |
| 284 | have hZ : IsZero F := Functor.isZero F (fun ⟨U⟩ ↦ |
| 285 | @AddCommGrpCat.isZero_of_subsingleton _ |
| 286 | ⟨fun s t ↦ by |
| 287 | apply hF.section_ext |
| 288 | intro x hx |
| 289 | obtain ⟨W, hxW, iU, iV, hEq⟩ := F.germ_eq x hx hx s t |
| 290 | ((hstalk x _).trans (hstalk x _).symm) |
| 291 | rw [Subsingleton.elim iU iV] at hEq |
| 292 | have hWU : W ≤ U := leOfHom iV |
| 293 | rw [Subsingleton.elim iV (homOfLE hWU)] at hEq |
| 294 | exact ⟨W, hWU, hxW, hEq⟩⟩) |
| 295 | have hFsh : IsZero Fsh := by |
| 296 | exact IsZero.mk |
| 297 | (fun G ↦ ⟨{ default := 0, uniq := fun f ↦ Sheaf.hom_ext (NatTrans.ext (funext |
| 298 | fun U ↦ (hZ.obj U).eq_zero_of_src (f.hom.app U))) }⟩) |
| 299 | (fun G ↦ ⟨{ default := 0, uniq := fun f ↦ Sheaf.hom_ext (NatTrans.ext (funext |
| 300 | fun U ↦ (hZ.obj U).eq_zero_of_tgt (f.hom.app U))) }⟩) |
| 301 | simpa [Fsh] using hFsh |
| 302 | |
| 303 | /-- If a bundled sheaf is zero, then its cohomology is subsingleton in every degree. -/ |
| 304 | theorem sheafH_subsingleton_of_isZero {X : TopCat.{u}} |
| 305 | {F : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X} (hzero : IsZero F) (n : ℕ) : |
| 306 | Subsingleton (Sheaf.H F n) := |
| 307 | ext_subsingleton_of_isZero_tgt hzero n |
| 308 | |
| 309 | /-- In a short exact sequence `X₁ → X₂ → X₃`, if the stalk map of `g` at `x` is an |
| 310 | isomorphism, then the stalk of `X₁` at `x` vanishes. -/ |
| 311 | theorem stalk_zero_of_ses_g_iso |
| 312 | {X : TopCat.{u}} |
| 313 | (S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)) (hS : S.ShortExact) |
| 314 | (x : X) |
| 315 | (hiso : IsIso ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map S.g.hom)) |
| 316 | (a : (TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).obj S.X₁.obj) : |
| 317 | a = 0 := by |
| 318 | let T := TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x |
| 319 | have hf_mono : Mono S.f.hom := by |
| 320 | exact (Sheaf.Hom.mono_iff_presheaf_mono |
| 321 | (J := Opens.grothendieckTopology X) (D := AddCommGrpCat.{u}) S.f).1 hS.mono_f |
| 322 | have : Mono S.f := by |
| 323 | exact (Sheaf.Hom.mono_iff_presheaf_mono |
| 324 | (J := Opens.grothendieckTopology X) (D := AddCommGrpCat.{u}) S.f).2 hf_mono |
| 325 | have hTf_mono : Mono (T.map S.f.hom) := by |
| 326 | exact Functor.map_mono (Vanishing.Projective.TopCat.Sheaf.forget _ _ ⋙ T) S.f |
| 327 | have hf0 : T.map S.f.hom = 0 := by |
| 328 | have : T.map S.f.hom ≫ T.map S.g.hom = 0 := by |
| 329 | have hzero : S.f.hom ≫ S.g.hom = 0 := congrArg InducedCategory.Hom.hom S.zero |
| 330 | rw [← T.map_comp, hzero, Functor.map_zero] |
| 331 | rw [show T.map S.f.hom = (T.map S.f.hom ≫ T.map S.g.hom) ≫ inv (T.map S.g.hom) by simp, |
| 332 | this, zero_comp] |
| 333 | exact (AddCommGrpCat.mono_iff_injective _).mp hTf_mono |
| 334 | (show ConcreteCategory.hom (T.map S.f.hom) a = ConcreteCategory.hom (T.map S.f.hom) 0 by |
| 335 | simp [hf0]) |
| 336 | |
| 337 | /-- In a short exact sequence `X₁ → X₂ → X₃`, if all stalks of `X₂` at `x` vanish, then |
| 338 | all stalks of `X₁` at `x` vanish (by mono-injectivity of `f`). -/ |
| 339 | theorem stalk_zero_of_shortExact_kernel |
| 340 | {X : TopCat.{u}} |
| 341 | (S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)) (hS : S.ShortExact) |
| 342 | (x : X) |
| 343 | (hX₂ : ∀ (b : (TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).obj S.X₂.obj), b = 0) |
| 344 | (a : (TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).obj S.X₁.obj) : |
| 345 | a = 0 := by |
| 346 | let T := TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x |
| 347 | have hf_mono : Mono S.f.hom := by |
| 348 | exact (Sheaf.Hom.mono_iff_presheaf_mono |
| 349 | (J := Opens.grothendieckTopology X) (D := AddCommGrpCat.{u}) S.f).1 hS.mono_f |
| 350 | have : Mono S.f := by |
| 351 | exact (Sheaf.Hom.mono_iff_presheaf_mono |
| 352 | (J := Opens.grothendieckTopology X) (D := AddCommGrpCat.{u}) S.f).2 hf_mono |
| 353 | have hTf_mono : Mono (T.map S.f.hom) := by |
| 354 | exact Functor.map_mono (Vanishing.Projective.TopCat.Sheaf.forget _ _ ⋙ T) S.f |
| 355 | exact (AddCommGrpCat.mono_iff_injective _).mp hTf_mono |
| 356 | ((hX₂ _).trans (map_zero _).symm) |
| 357 | |
| 358 | /-- If `g` is a cokernel of `f` and the stalk map of `f` at `x` is epi, then the stalk |
| 359 | of `S.X₃` at `x` vanishes. -/ |
| 360 | theorem stalk_zero_of_g_is_cokernel_of_stalk_epi |
| 361 | {X : TopCat.{u}} |
| 362 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 363 | (hg : IsColimit (CokernelCofork.ofπ S.g S.zero)) |
| 364 | (x : X) |
| 365 | (hepi : Epi ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map S.f.hom)) |
| 366 | (a : (TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).obj S.X₃.obj) : |
| 367 | a = 0 := by |
| 368 | let T : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X ⥤ AddCommGrpCat.{u} := |
| 369 | Vanishing.Projective.TopCat.Sheaf.forget AddCommGrpCat.{u} X ⋙ TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x |
| 370 | have : ∀ U : Opens X, Decidable (x ∈ U) := fun _ ↦ Classical.dec _ |
| 371 | have : T.IsLeftAdjoint := |
| 372 | (stalkSkyscraperSheafAdjunction (C := AddCommGrpCat.{u}) (X := X) (p₀ := x)).isLeftAdjoint |
| 373 | have : Epi (T.map S.f) := by |
| 374 | simpa [T] using hepi |
| 375 | have hzero_map : T.map S.f ≫ T.map S.g = 0 := by |
| 376 | rw [← T.map_comp, S.zero, Functor.map_zero] |
| 377 | have hcolim : IsColimit (CokernelCofork.ofπ (T.map S.g) hzero_map) := by |
| 378 | exact CokernelCofork.mapIsColimit _ hg T |
| 379 | have hzero : IsZero (T.obj S.X₃) := CokernelCofork.IsColimit.isZero_of_epi hcolim |
| 380 | have := AddCommGrpCat.subsingleton_of_isZero hzero |
| 381 | change T.obj S.X₃ at a |
| 382 | change (a : T.obj S.X₃) = 0 |
| 383 | exact Subsingleton.elim _ _ |
| 384 | |
| 385 | /-- Actual-cokernel specialization of |
| 386 | `stalk_zero_of_g_is_cokernel_of_stalk_epi`: if the stalk map of `f` at `x` |
| 387 | is surjective, then the stalk of `cokernel f` at `x` vanishes. -/ |
| 388 | theorem cokernel_stalk_zero_of_stalk_surj |
| 389 | {X : TopCat.{u}} |
| 390 | {F G : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X} |
| 391 | (f : F ⟶ G) (x : X) |
| 392 | (hf : Function.Surjective (ConcreteCategory.hom |
| 393 | ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map f.hom))) |
| 394 | (a : (TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).obj |
| 395 | (Limits.cokernel f).obj) : |
| 396 | a = 0 := by |
| 397 | let S := ShortComplex.mk f (Limits.cokernel.π f) (Limits.cokernel.condition f) |
| 398 | have hepi : Epi ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map f.hom) := by |
| 399 | simpa using (AddCommGrpCat.epi_iff_surjective _).mpr hf |
| 400 | simpa [S] using stalk_zero_of_g_is_cokernel_of_stalk_epi |
| 401 | (S := S) |
| 402 | (by simpa [S] using (cokernelIsCokernel f)) |
| 403 | x hepi a |
| 404 | |
| 405 | /-! ## H⁰ ≅ Sections -/ |
| 406 | |
| 407 | /-- If `F` is a sheaf, then `H F 0` is equivalent to sections on `⊤`. -/ |
| 408 | noncomputable def sheafH0EquivSections {X : TopCat.{u}} |
| 409 | (F : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) : |
| 410 | Sheaf.H F 0 ≃+ F.obj.obj (op ⊤) := |
| 411 | Ext.addEquiv₀.trans |
| 412 | (((constantSheafAdj (Opens.grothendieckTopology X) AddCommGrpCat |
| 413 | Limits.isTerminalTop).homAddEquiv _ F).trans |
| 414 | ((@AddCommGrpCat.homAddEquiv (AddCommGrpCat.of (ULift ℤ)) (F.obj.obj (op ⊤))).trans |
| 415 | (AddEquiv.mk' (uliftZMultiplesHom (F.obj.obj (op ⊤))) (by |
| 416 | intro x y |
| 417 | ext |
| 418 | simp_all only [uliftZMultiplesHom_apply_apply, smul_add, AddMonoidHom.add_apply])).symm)) |
| 419 | |
| 420 | /-- Naturality of `sheafH0EquivSections`: composing `x` with `mk₀ f` at |
| 421 | degree 0 corresponds to applying `f.app(⊤)` on sections. -/ |
| 422 | lemma sheafH0EquivSections_natural {X : TopCat.{u}} |
| 423 | {F G : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X} (f : F ⟶ G) (x : Sheaf.H F 0) : |
| 424 | sheafH0EquivSections G (x.comp (Ext.mk₀ f) (add_zero 0)) = |
| 425 | ConcreteCategory.hom (f.hom.app (op ⊤)) (sheafH0EquivSections F x) := by |
| 426 | conv_lhs => rw [show x = Ext.mk₀ (Ext.addEquiv₀ x) from |
| 427 | (Ext.mk₀_addEquiv₀_apply x).symm, Ext.mk₀_comp_mk₀] |
| 428 | unfold sheafH0EquivSections |
| 429 | simp only [AddEquiv.trans_apply] |
| 430 | have key : |
| 431 | Ext.addEquiv₀ (Ext.mk₀ (Ext.addEquiv₀ x ≫ f)) = Ext.addEquiv₀ x ≫ f := |
| 432 | by |
| 433 | change Ext.addEquiv₀ (Ext.addEquiv₀.symm (Ext.addEquiv₀ x ≫ f)) = Ext.addEquiv₀ x ≫ f |
| 434 | simpa using Ext.addEquiv₀.apply_symm_apply (Ext.addEquiv₀ x ≫ f) |
| 435 | erw [Adjunction.homAddEquiv_apply, Adjunction.homAddEquiv_apply, key, |
| 436 | Adjunction.homEquiv_naturality_right, Adjunction.homAddEquiv_apply] |
| 437 | rfl |
| 438 | |
| 439 | /-- `H¹(S.X₁)` as the cokernel of top sections for a short exact sequence of sheaves, |
| 440 | assuming `H¹(S.X₂)` is subsingleton. -/ |
| 441 | noncomputable def sheafH1_cokernel_iso_of_subsingleton_middle {X : TopCat.{u}} |
| 442 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 443 | (hS : S.ShortExact) |
| 444 | (h₂H : Subsingleton (Sheaf.H S.X₂ 1)) : |
| 445 | cokernel (S.g.hom.app (op ⊤)) ≅ AddCommGrpCat.of (Sheaf.H S.X₁ 1) := by |
| 446 | let δ : S.X₃.obj.obj (op ⊤) ⟶ AddCommGrpCat.of (Sheaf.H S.X₁ 1) := |
| 447 | AddCommGrpCat.ofHom ((sheafH0EquivSections S.X₃).symm.toAddMonoidHom) ≫ |
| 448 | sheafH_succ_map hS 0 |
| 449 | have hδ : S.g.hom.app (op ⊤) ≫ δ = 0 := by |
| 450 | ext s |
| 451 | let y : Sheaf.H S.X₂ 0 := (sheafH0EquivSections S.X₂).symm s |
| 452 | change ConcreteCategory.hom (sheafH_succ_map hS 0) |
| 453 | ((sheafH0EquivSections S.X₃).symm |
| 454 | (ConcreteCategory.hom (S.g.hom.app (op ⊤)) s)) = 0 |
| 455 | rw [← show y.comp (Ext.mk₀ S.g) (add_zero 0) = |
| 456 | (sheafH0EquivSections S.X₃).symm |
| 457 | (ConcreteCategory.hom (S.g.hom.app (op ⊤)) s) from |
| 458 | (sheafH0EquivSections S.X₃).injective (by |
| 459 | simpa [y] using sheafH0EquivSections_natural (f := S.g) (x := y)), |
| 460 | sheafH_succ_map_apply, |
| 461 | Ext.comp_assoc_of_second_deg_zero _ (Ext.mk₀ S.g) hS.extClass rfl, |
| 462 | hS.comp_extClass, Ext.comp_zero _ _ 1 1 rfl] |
| 463 | let πH : cokernel (S.g.hom.app (op ⊤)) ⟶ AddCommGrpCat.of (Sheaf.H S.X₁ 1) := |
| 464 | cokernel.desc _ δ hδ |
| 465 | have hπH_epi : Epi πH := by |
| 466 | rw [AddCommGrpCat.epi_iff_surjective] |
| 467 | intro x |
| 468 | obtain ⟨y, hy⟩ := sheafH_succ_map_exists_preimage_of_subsingleton_middle hS 0 h₂H x |
| 469 | refine ⟨ConcreteCategory.hom (cokernel.π (S.g.hom.app (op ⊤))) |
| 470 | (sheafH0EquivSections S.X₃ y), ?_⟩ |
| 471 | simpa [πH, δ] using hy |
| 472 | have hπH_mono : Mono πH := by |
| 473 | rw [AddCommGrpCat.mono_iff_injective] |
| 474 | intro a b hab |
| 475 | apply sub_eq_zero.mp |
| 476 | obtain ⟨s, hs⟩ := (AddCommGrpCat.epi_iff_surjective |
| 477 | (cokernel.π (S.g.hom.app (op ⊤)))).mp inferInstance (a - b) |
| 478 | rw [← hs] |
| 479 | have hzero : |
| 480 | ((((sheafH0EquivSections S.X₃).symm s).comp hS.extClass rfl) : |
| 481 | Sheaf.H S.X₁ 1) = 0 := by |
| 482 | change ConcreteCategory.hom (sheafH_succ_map hS 0) |
| 483 | ((sheafH0EquivSections S.X₃).symm s) = 0 |
| 484 | simpa [πH, δ, ← hs] using (by |
| 485 | rw [map_sub, hab, sub_self] : ConcreteCategory.hom πH (a - b) = 0) |
| 486 | obtain ⟨y, hy⟩ := Ext.covariant_sequence_exact₃ _ hS |
| 487 | ((sheafH0EquivSections S.X₃).symm s) rfl hzero |
| 488 | have hy_sec := |
| 489 | (sheafH0EquivSections_natural (f := S.g) (x := y)).symm.trans <| |
| 490 | by simpa using (congrArg (sheafH0EquivSections S.X₃) hy) |
| 491 | simpa using |
| 492 | congrArg (ConcreteCategory.hom (cokernel.π (S.g.hom.app (op ⊤)))) hy_sec.symm |
| 493 | have : IsIso πH := isIso_of_mono_of_epi πH |
| 494 | exact asIso πH |
| 495 | |
| 496 | @[simp] theorem sheafH1_cokernel_iso_of_subsingleton_middle_hom_π {X : TopCat.{u}} |
| 497 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 498 | (hS : S.ShortExact) |
| 499 | (h₂H : Subsingleton (Sheaf.H S.X₂ 1)) |
| 500 | (s : S.X₃.obj.obj (op ⊤)) : |
| 501 | ConcreteCategory.hom |
| 502 | ((sheafH1_cokernel_iso_of_subsingleton_middle hS h₂H).hom) |
| 503 | (ConcreteCategory.hom (cokernel.π (S.g.hom.app (op ⊤))) s) = |
| 504 | ((sheafH0EquivSections S.X₃).symm s).comp hS.extClass rfl := by |
| 505 | simpa [sheafH1_cokernel_iso_of_subsingleton_middle] using |
| 506 | sheafH_succ_map_apply hS 0 ((sheafH0EquivSections S.X₃).symm s) |
| 507 | |
| 508 | /-- If a sheaf morphism is surjective on top sections, then every degree-zero cohomology |
| 509 | class of the target lifts along it. -/ |
| 510 | theorem sheafH0_surj_of_epi_app_top {X : TopCat.{u}} |
| 511 | {F G : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X} (f : F ⟶ G) |
| 512 | (hf : Epi (f.hom.app (op ⊤))) : |
| 513 | ∀ y : Sheaf.H G 0, ∃ z : Sheaf.H F 0, z.comp (Ext.mk₀ f) (add_zero 0) = y := by |
| 514 | intro y |
| 515 | obtain ⟨s, hs⟩ := (AddCommGrpCat.epi_iff_surjective _).mp hf |
| 516 | (sheafH0EquivSections G y) |
| 517 | refine ⟨(sheafH0EquivSections F).symm s, ?_⟩ |
| 518 | apply (sheafH0EquivSections G).injective |
| 519 | rw [sheafH0EquivSections_natural (f := f), AddEquiv.apply_symm_apply, hs] |
| 520 | |
| 521 | /-- Internal helper for `H^1` vanishing via degree-zero surjectivity. -/ |
| 522 | private theorem subsingleton_H1_via_surj {C' : Type*} [Category C'] [Abelian C'] [HasExt C'] |
| 523 | (Z : C') {S : ShortComplex C'} (hSE : S.ShortExact) |
| 524 | (hJ : Subsingleton (Ext Z S.X₂ 1)) |
| 525 | (h_surj : ∀ y : Ext Z S.X₃ 0, |
| 526 | ∃ z : Ext Z S.X₂ 0, z.comp (Ext.mk₀ S.g) (add_zero 0) = y) : |
| 527 | Subsingleton (Ext Z S.X₁ 1) := by |
| 528 | constructor; intro a b |
| 529 | obtain ⟨c, hc⟩ := Ext.covariant_sequence_exact₁ _ hSE a (@Subsingleton.elim _ hJ _ _) rfl |
| 530 | obtain ⟨d, hd⟩ := Ext.covariant_sequence_exact₁ _ hSE b (@Subsingleton.elim _ hJ _ _) rfl |
| 531 | obtain ⟨c', hc'⟩ := h_surj c; obtain ⟨d', hd'⟩ := h_surj d |
| 532 | simp only [← hc, ← hd, ← hc', ← hd', Ext.comp_assoc_of_second_deg_zero _ (Ext.mk₀ S.g) |
| 533 | hSE.extClass rfl, hSE.comp_extClass, Ext.comp_zero _ _ 1 1 rfl] |
| 534 | |
| 535 | /-- `H¹` vanishing via degree-zero surjectivity. -/ |
| 536 | theorem sheafH_subsingleton_H1_via_surj {X : TopCat.{u}} |
| 537 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 538 | (hS : S.ShortExact) |
| 539 | (h₂H : Subsingleton (Sheaf.H S.X₂ 1)) |
| 540 | (h_surj : ∀ y : Sheaf.H S.X₃ 0, |
| 541 | ∃ z : Sheaf.H S.X₂ 0, z.comp (Ext.mk₀ S.g) (add_zero 0) = y) : |
| 542 | Subsingleton (Sheaf.H S.X₁ 1) := |
| 543 | subsingleton_H1_via_surj _ hS h₂H h_surj |
| 544 | |
| 545 | /-- `H¹` vanishing criterion from surjective top sections. -/ |
| 546 | theorem sheafH_subsingleton_H1_via_epi_app_top {X : TopCat.{u}} |
| 547 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 548 | (hS : S.ShortExact) |
| 549 | (h₂H : Subsingleton (Sheaf.H S.X₂ 1)) |
| 550 | (hg : Epi (S.g.hom.app (op ⊤))) : |
| 551 | Subsingleton (Sheaf.H S.X₁ 1) := |
| 552 | sheafH_subsingleton_H1_via_surj hS h₂H (sheafH0_surj_of_epi_app_top S.g hg) |
| 553 | |
| 554 | /-- Positive-degree cohomology of an injective sheaf is subsingleton. -/ |
| 555 | theorem sheafH_subsingleton_of_injective |
| 556 | {C : Type u} [Category.{v} C] {J : GrothendieckTopology C} |
| 557 | [HasSheafify J AddCommGrpCat.{w}] [HasExt.{w'} (Sheaf J AddCommGrpCat.{w})] |
| 558 | (I : Sheaf J AddCommGrpCat.{w}) [Injective I] (n : ℕ) : |
| 559 | Subsingleton (Sheaf.H I (n + 1)) := by |
| 560 | simpa [Sheaf.H] using |
| 561 | (Ext.subsingleton_of_injective |
| 562 | ((constantSheaf J AddCommGrpCat.{w}).obj (AddCommGrpCat.of (ULift.{w} ℤ))) I n) |
| 563 | |
| 564 | /-- `H¹` vanishing criterion with injective middle term. -/ |
| 565 | theorem sheafH_subsingleton_H1_of_injective_of_epi_app_top {X : TopCat.{u}} |
| 566 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 567 | (hS : S.ShortExact) |
| 568 | [Injective S.X₂] |
| 569 | (hg : Epi (S.g.hom.app (op ⊤))) : |
| 570 | Subsingleton (Sheaf.H S.X₁ 1) := |
| 571 | sheafH_subsingleton_H1_via_epi_app_top hS (Ext.subsingleton_of_injective _ _ 0) hg |
| 572 | |
| 573 | /-- Forward dimension shift for a short exact sequence of sheaves. -/ |
| 574 | theorem sheafH_dimension_shift_of_both {X : TopCat.{u}} |
| 575 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 576 | (hS : S.ShortExact) |
| 577 | (n : ℕ) |
| 578 | (h₃H : Subsingleton (Sheaf.H S.X₃ n)) |
| 579 | (h₂H : Subsingleton (Sheaf.H S.X₂ (n + 1))) : |
| 580 | Subsingleton (Sheaf.H S.X₁ (n + 1)) := |
| 581 | ext_dimension_shift _ hS n h₃H h₂H |
| 582 | |
| 583 | /-- Forward dimension shift for a monomorphism of sheaves: |
| 584 | if `f: F ⟶ G` is mono, the cokernel sheaf has subsingleton `H^n`, and |
| 585 | `G` has subsingleton `H^(n+1)`, then `F` has subsingleton `H^(n+1)`. -/ |
| 586 | theorem sheafH_dimension_shift_of_mono {X : TopCat.{u}} |
| 587 | {F G : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X} |
| 588 | (f : F ⟶ G) [Mono f] (n : ℕ) |
| 589 | (h₃ : Subsingleton (Sheaf.H (cokernel f) n)) |
| 590 | (h₂ : Subsingleton (Sheaf.H G (n + 1))) : |
| 591 | Subsingleton (Sheaf.H F (n + 1)) := by |
| 592 | let S := ShortComplex.mk f (cokernel.π f) (cokernel.condition f) |
| 593 | have hS : S.ShortExact := ShortComplex.ShortExact.mk' |
| 594 | (ShortComplex.exact_of_g_is_cokernel _ (cokernelIsCokernel f)) |
| 595 | inferInstance inferInstance |
| 596 | simpa [S] using |
| 597 | sheafH_dimension_shift_of_both hS n (by simpa [S] using h₃) (by simpa [S] using h₂) |
| 598 | |
| 599 | /-- Forward dimension shifting with injective middle term: |
| 600 | if `0 → S.X₁ → S.X₂ → S.X₃ → 0` is short exact, `S.X₂` is injective, |
| 601 | and `H^n(S.X₃)=0`, then `H^(n+1)(S.X₁)=0`. -/ |
| 602 | theorem sheafH_dimension_shift_of_injective {X : TopCat.{u}} |
| 603 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 604 | (hS : S.ShortExact) |
| 605 | [Injective S.X₂] |
| 606 | (n : ℕ) |
| 607 | (h₃H : Subsingleton (Sheaf.H S.X₃ n)) : |
| 608 | Subsingleton (Sheaf.H S.X₁ (n + 1)) := |
| 609 | ext_dimension_shift _ hS n h₃H (Ext.subsingleton_of_injective _ _ n) |
| 610 | |
| 611 | /-- Reverse dimension shift for a locally surjective morphism: |
| 612 | if `f: F ⟶ G` is locally surjective, `H^n(F)` is subsingleton, and |
| 613 | `H^(n+1)(kernel f)` is subsingleton, then `H^n(G)` is subsingleton. -/ |
| 614 | theorem sheafH_dimension_shift_X₃_of_locallySurjective {X : TopCat.{u}} |
| 615 | {F G : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X} |
| 616 | (f : F ⟶ G) (hf : TopCat.Presheaf.IsLocallySurjective f.hom) (n : ℕ) |
| 617 | (h₂ : Subsingleton (Sheaf.H F n)) |
| 618 | (h₁ : Subsingleton (Sheaf.H (kernel f) (n + 1))) : |
| 619 | Subsingleton (Sheaf.H G n) := by |
| 620 | let : Balanced (CategoryTheory.Sheaf (Opens.grothendieckTopology X) |
| 621 | AddCommGrpCat.{u}) := balanced_of_strongEpiCategory |
| 622 | have : Epi f := by |
| 623 | rw [← Sheaf.isLocallySurjective_iff_epi' AddCommGrpCat.{u} f] |
| 624 | exact hf |
| 625 | let S := ShortComplex.mk (kernel.ι f) f (kernel.condition f) |
| 626 | have hS : S.ShortExact := ShortComplex.ShortExact.mk' |
| 627 | (ShortComplex.exact_of_f_is_kernel _ (kernelIsKernel f)) inferInstance inferInstance |
| 628 | simpa [S] using |
| 629 | ext_dimension_shift_X₃ _ hS n (by simpa [S] using h₂) (by simpa [S] using h₁) |
| 630 | |
| 631 | /-- If `X` is empty, then the cohomology of every sheaf on `X` is subsingleton. -/ |
| 632 | theorem sheafH_subsingleton_of_isEmpty {X : TopCat.{u}} [IsEmpty X] |
| 633 | (F : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) (n : ℕ) : |
| 634 | Subsingleton (Sheaf.H F n) := |
| 635 | sheafH_subsingleton_of_isZero |
| 636 | (sheaf_isZero_of_zero_stalks X F.property (fun x _ ↦ (IsEmpty.false x).elim)) n |
| 637 | |
| 638 | /-! ## Sheaf Cohomology Functor -/ |
| 639 | |
| 640 | /-- The sheaf cohomology functor `H^n: Sheaf(X, Ab) ⥤ Ab`, defined as the covariant |
| 641 | Ext functor `Ext^n(ℤ_X, −)` where `ℤ_X` is the constant sheaf of integers. -/ |
| 642 | noncomputable def sheafCohomologyFunctor (X : TopCat.{u}) (n : ℕ) : |
| 643 | Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X ⥤ AddCommGrpCat.{u} := |
| 644 | extFunctorObj ((constantSheaf (Opens.grothendieckTopology X) AddCommGrpCat).obj |
| 645 | (AddCommGrpCat.of (ULift.{u} ℤ))) n |
| 646 | |
| 647 | @[simp] |
| 648 | theorem sheafCohomologyFunctor_map_apply (X : TopCat.{u}) (n : ℕ) |
| 649 | {F G : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X} (f : F ⟶ G) |
| 650 | (x : Sheaf.H F n) : |
| 651 | ConcreteCategory.hom ((sheafCohomologyFunctor X n).map f) x = |
| 652 | x.comp (Ext.mk₀ f) (add_zero n) := rfl |
| 653 | |
| 654 | -- If both ends of a short exact sequence have vanishing H^n, so does the middle. |
| 655 | /-- Middle-term cohomology vanishing: if `f: F ⟶ G` is mono and the cohomology of `F` |
| 656 | and `cokernel f` are subsingleton in degree `n`, then so is the cohomology of `G`. -/ |
| 657 | theorem subsingleton_sheafH_of_shortExact_middle {X : TopCat.{u}} |
| 658 | {F G : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X} |
| 659 | (f : F ⟶ G) [Mono f] (n : ℕ) |
| 660 | (h₁ : Subsingleton (Sheaf.H F n)) |
| 661 | (h₃ : Subsingleton (Sheaf.H (cokernel f) n)) : |
| 662 | Subsingleton (Sheaf.H G n) := by |
| 663 | let S := ShortComplex.mk f (cokernel.π f) (cokernel.condition f) |
| 664 | have hS : S.ShortExact := ShortComplex.ShortExact.mk' |
| 665 | (ShortComplex.exact_of_g_is_cokernel _ (cokernelIsCokernel f)) |
| 666 | inferInstance inferInstance |
| 667 | have h₁' : Subsingleton (Sheaf.H S.X₁ n) := by |
| 668 | simpa [S] using h₁ |
| 669 | have h₃' : Subsingleton (Sheaf.H S.X₃ n) := by |
| 670 | simpa [S] using h₃ |
| 671 | constructor |
| 672 | intro a b |
| 673 | obtain ⟨c, hc⟩ := Ext.covariant_sequence_exact₂ _ hS a |
| 674 | (@Subsingleton.elim _ ((add_zero n) ▸ h₃') _ _) |
| 675 | obtain ⟨d, hd⟩ := Ext.covariant_sequence_exact₂ _ hS b |
| 676 | (@Subsingleton.elim _ ((add_zero n) ▸ h₃') _ _) |
| 677 | rw [← hc, ← hd, @Subsingleton.elim _ h₁' c d] |
| 678 | |
| 679 | /-- Naturality of `sheafH1_cokernel_iso_of_subsingleton_middle` for a morphism between |
| 680 | two short exact sequences of sheaves. -/ |
| 681 | theorem sheafH1_cokernel_iso_of_subsingleton_middle_natural {X : TopCat.{u}} |
| 682 | {S₁ S₂ : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 683 | (hS₁ : S₁.ShortExact) (hS₂ : S₂.ShortExact) (φ : S₁ ⟶ S₂) |
| 684 | (h₁₂H : Subsingleton (Sheaf.H S₁.X₂ 1)) |
| 685 | (h₂₂H : Subsingleton (Sheaf.H S₂.X₂ 1)) : |
| 686 | cokernel.map (S₁.g.hom.app (op ⊤)) (S₂.g.hom.app (op ⊤)) |
| 687 | (φ.τ₂.hom.app (op ⊤)) (φ.τ₃.hom.app (op ⊤)) |
| 688 | (by |
| 689 | simpa using congrArg |
| 690 | (fun α : S₁.X₂ ⟶ S₂.X₃ ↦ α.hom.app (op ⊤)) φ.comm₂₃.symm) ≫ |
| 691 | (sheafH1_cokernel_iso_of_subsingleton_middle hS₂ h₂₂H).hom = |
| 692 | (sheafH1_cokernel_iso_of_subsingleton_middle hS₁ h₁₂H).hom ≫ |
| 693 | (sheafCohomologyFunctor X 1).map φ.τ₁ := by |
| 694 | apply (cancel_epi (cokernel.π (S₁.g.hom.app (op ⊤)))).mp |
| 695 | rw [cokernel.π_desc_assoc, Category.assoc] |
| 696 | ext s |
| 697 | have hs : |
| 698 | (((sheafH0EquivSections S₁.X₃).symm s).comp |
| 699 | (Ext.mk₀ φ.τ₃) (add_zero 0)) = |
| 700 | (sheafH0EquivSections S₂.X₃).symm |
| 701 | (ConcreteCategory.hom (φ.τ₃.hom.app (op ⊤)) s) := by |
| 702 | apply (sheafH0EquivSections S₂.X₃).injective |
| 703 | simpa using |
| 704 | (sheafH0EquivSections_natural (f := φ.τ₃) |
| 705 | (x := (sheafH0EquivSections S₁.X₃).symm s)) |
| 706 | change ConcreteCategory.hom |
| 707 | (cokernel.π (S₂.g.hom.app (op ⊤)) ≫ |
| 708 | (sheafH1_cokernel_iso_of_subsingleton_middle hS₂ h₂₂H).hom) |
| 709 | (ConcreteCategory.hom (φ.τ₃.hom.app (op ⊤)) s) = |
| 710 | ConcreteCategory.hom |
| 711 | ((sheafH1_cokernel_iso_of_subsingleton_middle hS₁ h₁₂H).hom ≫ |
| 712 | (sheafCohomologyFunctor X 1).map φ.τ₁) |
| 713 | (ConcreteCategory.hom (cokernel.π (S₁.g.hom.app (op ⊤))) s) |
| 714 | simp only [ConcreteCategory.comp_apply] |
| 715 | rw [sheafH1_cokernel_iso_of_subsingleton_middle_hom_π, |
| 716 | sheafH1_cokernel_iso_of_subsingleton_middle_hom_π] |
| 717 | change (((sheafH0EquivSections S₂.X₃).symm |
| 718 | (ConcreteCategory.hom (φ.τ₃.hom.app (op ⊤)) s)).comp hS₂.extClass rfl) = |
| 719 | ((((sheafH0EquivSections S₁.X₃).symm s).comp hS₁.extClass rfl).comp |
| 720 | (Ext.mk₀ φ.τ₁) (add_zero 1)) |
| 721 | rw [← hs] |
| 722 | simpa using |
| 723 | (sheafH_comp_extClass_naturality hS₁ hS₂ φ 0 |
| 724 | ((sheafH0EquivSections S₁.X₃).symm s)).symm |
| 725 | |
| 726 | /-- The degree-`0` sheaf cohomology functor is naturally isomorphic to taking sections on `⊤`. -/ |
| 727 | noncomputable def sheafH0NatIsoSections {X : TopCat.{u}} : |
| 728 | sheafCohomologyFunctor X 0 ≅ |
| 729 | sheafToPresheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u} ⋙ |
| 730 | (CategoryTheory.evaluation (Opens X)ᵒᵖ AddCommGrpCat.{u}).obj (op ⊤) := |
| 731 | NatIso.ofComponents (fun F ↦ (sheafH0EquivSections F).toAddCommGrpIso) |
| 732 | fun {F G} f ↦ by |
| 733 | ext x |
| 734 | exact sheafH0EquivSections_natural (f := f) (x := x) |
| 735 | |
| 736 | /-- Higher-degree connecting additive equivalence for a short exact sequence of sheaves: |
| 737 | if the middle cohomology groups in degrees `n` and `n + 1` are subsingleton, then the |
| 738 | connecting morphism induces an additive equivalence `H^n(S.X₃) ≃+ H^(n+1)(S.X₁)`. -/ |
| 739 | private noncomputable def sheafH_extClassAddEquiv_of_subsingleton_middle {X : TopCat.{u}} |
| 740 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 741 | (hS : S.ShortExact) (n : ℕ) |
| 742 | (h₂n : Subsingleton (Sheaf.H S.X₂ n)) |
| 743 | (h₂succ : Subsingleton (Sheaf.H S.X₂ (n + 1))) : |
| 744 | Sheaf.H S.X₃ n ≃+ Sheaf.H S.X₁ (n + 1) := |
| 745 | extClass_postcompAddEquiv_of_subsingleton_middle _ hS n h₂n h₂succ |
| 746 | |
| 747 | @[simp] private theorem sheafH_extClassAddEquiv_of_subsingleton_middle_apply |
| 748 | {X : TopCat.{u}} {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 749 | (hS : S.ShortExact) (n : ℕ) |
| 750 | (h₂n : Subsingleton (Sheaf.H S.X₂ n)) |
| 751 | (h₂succ : Subsingleton (Sheaf.H S.X₂ (n + 1))) |
| 752 | (y : Sheaf.H S.X₃ n) : |
| 753 | sheafH_extClassAddEquiv_of_subsingleton_middle hS n h₂n h₂succ y = |
| 754 | y.comp hS.extClass rfl := rfl |
| 755 | |
| 756 | /-- Higher-degree connecting isomorphism for a short exact sequence of sheaves: if the |
| 757 | middle cohomology groups in degrees `n` and `n + 1` are subsingleton, then the connecting |
| 758 | morphism induces an isomorphism `H^n(S.X₃) ≅ H^(n+1)(S.X₁)`. -/ |
| 759 | noncomputable def sheafH_succ_iso_of_subsingleton_middle {X : TopCat.{u}} |
| 760 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 761 | (hS : S.ShortExact) (n : ℕ) |
| 762 | (h₂n : Subsingleton (Sheaf.H S.X₂ n)) |
| 763 | (h₂succ : Subsingleton (Sheaf.H S.X₂ (n + 1))) : |
| 764 | AddCommGrpCat.of (Sheaf.H S.X₃ n) ≅ AddCommGrpCat.of (Sheaf.H S.X₁ (n + 1)) := |
| 765 | (sheafH_extClassAddEquiv_of_subsingleton_middle hS n h₂n h₂succ).toAddCommGrpIso |
| 766 | |
| 767 | private theorem sheafH_succ_iso_of_subsingleton_middle_hom_apply {X : TopCat.{u}} |
| 768 | {S : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 769 | (hS : S.ShortExact) (n : ℕ) |
| 770 | (h₂n : Subsingleton (Sheaf.H S.X₂ n)) |
| 771 | (h₂succ : Subsingleton (Sheaf.H S.X₂ (n + 1))) |
| 772 | (y : Sheaf.H S.X₃ n) : |
| 773 | ConcreteCategory.hom |
| 774 | ((sheafH_succ_iso_of_subsingleton_middle hS n h₂n h₂succ).hom) y = |
| 775 | y.comp hS.extClass rfl := |
| 776 | sheafH_extClassAddEquiv_of_subsingleton_middle_apply hS n h₂n h₂succ y |
| 777 | |
| 778 | /-- Naturality of `sheafH_succ_iso_of_subsingleton_middle` for a morphism between two |
| 779 | short exact sequences of sheaves. -/ |
| 780 | theorem sheafH_succ_iso_of_subsingleton_middle_natural {X : TopCat.{u}} |
| 781 | {S₁ S₂ : ShortComplex (Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)} |
| 782 | (hS₁ : S₁.ShortExact) (hS₂ : S₂.ShortExact) (φ : S₁ ⟶ S₂) (n : ℕ) |
| 783 | (h₁₂n : Subsingleton (Sheaf.H S₁.X₂ n)) |
| 784 | (h₁₂succ : Subsingleton (Sheaf.H S₁.X₂ (n + 1))) |
| 785 | (h₂₂n : Subsingleton (Sheaf.H S₂.X₂ n)) |
| 786 | (h₂₂succ : Subsingleton (Sheaf.H S₂.X₂ (n + 1))) : |
| 787 | (sheafH_succ_iso_of_subsingleton_middle hS₁ n h₁₂n h₁₂succ).hom ≫ |
| 788 | (sheafCohomologyFunctor X (n + 1)).map φ.τ₁ = |
| 789 | (sheafCohomologyFunctor X n).map φ.τ₃ ≫ |
| 790 | (sheafH_succ_iso_of_subsingleton_middle hS₂ n h₂₂n h₂₂succ).hom := by |
| 791 | ext y |
| 792 | have hcomp : |
| 793 | y.comp (hS₁.extClass.comp (Ext.mk₀ φ.τ₁) (add_zero 1)) rfl = |
| 794 | y.comp ((Ext.mk₀ φ.τ₃).comp hS₂.extClass (zero_add 1)) rfl := by |
| 795 | exact congrArg (fun t ↦ y.comp t rfl) (extClass_naturality hS₁ hS₂ φ).symm |
| 796 | rw [AddCommGrpCat.hom_comp, AddCommGrpCat.hom_comp] |
| 797 | change |
| 798 | (ConcreteCategory.hom ((sheafCohomologyFunctor X (n + 1)).map φ.τ₁) |
| 799 | (ConcreteCategory.hom ((sheafH_succ_iso_of_subsingleton_middle |
| 800 | hS₁ n h₁₂n h₁₂succ).hom) y)) = |
| 801 | (ConcreteCategory.hom ((sheafH_succ_iso_of_subsingleton_middle |
| 802 | hS₂ n h₂₂n h₂₂succ).hom) |
| 803 | (ConcreteCategory.hom ((sheafCohomologyFunctor X n).map φ.τ₃) y)) |
| 804 | rw [sheafH_succ_iso_of_subsingleton_middle_hom_apply, |
| 805 | sheafCohomologyFunctor_map_apply, sheafCohomologyFunctor_map_apply, |
| 806 | sheafH_succ_iso_of_subsingleton_middle_hom_apply] |
| 807 | simpa [Ext.comp_assoc_of_third_deg_zero, Ext.comp_assoc_of_second_deg_zero] using hcomp |
| 808 | end ProjectiveVanishing |
| 809 | |
| 810 | end OAI.AlgebraicGeometry.SheafCohomology.API |