import OAI.AlgebraicGeometry.SheafCohomology.ClosedImmersionCohomology import OAI.AlgebraicGeometry.SheafCohomology.ConstantFlasque import OAI.AlgebraicGeometry.SheafCohomology.FinitelyGeneratedVanishing import OAI.AlgebraicGeometry.SheafCohomology.FlasqueVanishing import OAI.AlgebraicGeometry.SheafCohomology.TopologicalKrullDim import OAI.AlgebraicGeometry.SheafCohomology.ZeroOutside /-! # Irreducible Step -/ namespace OAI.AlgebraicGeometry.SheafCohomology.IrreducibleStep open _root_.CategoryTheory _root_.TopologicalSpace _root_.Order open _root_.CategoryTheory.Limits _root_.Opposite set_option backward.isDefEq.respectTransparency false namespace ProjectiveVanishing open OAI.AlgebraicGeometry.SheafCohomology.Vanishing.Projective.TopCat /-! # Irreducible positive-dimensional vanishing Assembly of the irreducible positive-dimensional case of Hartshorne III.2.7. Given the induction hypothesis `VanishingIH` on spaces of strictly smaller Krull dimension, this file proves vanishing for all sheaves on an irreducible Noetherian space `X` with `dim X > 0`. The key Noetherian-shrinking step `exists_section_generating_stalks` uses `Nat.find` to pick a point `x₀` whose image subgroup is generated by a minimal positive integer `d`, then propagates divisibility `d | d_x` to every other point of a sufficiently small neighbourhood by minimality. ## Main definitions * `VanishingIH` — the induction hypothesis predicate. ## Main results * `sHom_stalk_bijective_at` — stalk-bijectivity criterion for the section homomorphism. * `exists_nonzero_stalk_in_V` — a nonzero subsheaf of `zeroOutsideInt V` has a nonzero stalk at some point of `V`. * `exists_section_generating_stalks`, `exists_good_section`, `subsheaf_contains_zeroOutsideInt` — the Noetherian-shrinking step. * `closedComplementVanishing` — vanishing for sheaves supported on a closed complement. * `zeroOutsideInt_vanishing`, `zeroOutsideInt_cohomology_vanishing` — Step 5 vanishing. * `subsheaf_zeroOutsideInt_vanishing` — Step 4 vanishing. * `epiImage_zeroOutsideInt_vanishing_of_locallySurjective` — Steps 3C + 4 + LES combined. * `irreducible_pos_vanishing` — the headline assembly. -/ universe u open Abelian Limits /-- The stalk map of `sHom s` at `x ∈ U` is bijective when every stalk element of R at x is an integer multiple of `germ(s, x)`, and R embeds into `zeroOutsideInt V` (providing torsion-freeness needed for injectivity). -/ theorem sHom_stalk_bijective_at {X : TopCat.{u}} {V U : Opens X} (hUV : U ≤ V) {R : TopCat.Presheaf AddCommGrpCat.{u} X} (hRsh : R.IsSheaf) (i : R ⟶ (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj) [Mono i] (s : R.obj (op U)) (x : X) (hxU : x ∈ U) -- germ(s, x) ≠ 0 (needed for injectivity; without this, stalk(R,x) could be 0 -- while stalk(zeroOutsideInt U, x) ≅ ℤ, making the map non-injective) (hs_ne : R.germ U x hxU s ≠ 0) -- Every stalk element of R at x is an integer multiple of germ(s, x) (hgen : ∀ (a : (TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).obj R), ∃ k : ℤ, a = k • R.germ U x hxU s) : Function.Bijective (ConcreteCategory.hom ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.sHomVal hRsh s))) := by let T := TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x let sHom_x := ConcreteCategory.hom (T.map (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.sHomVal hRsh s)) let i_x := ConcreteCategory.hom (T.map i) have hi_inj : Function.Injective i_x := TopCat.Presheaf.stalkFunctor_map_injective_of_app_injective (f := i) (fun U ↦ (ConcreteCategory.mono_iff_injective_of_preservesPullback (i.app (op U))).mp ((NatTrans.mono_iff_mono_app i).mp inferInstance (op U))) x have hi_s_ne : i_x (R.germ U x hxU s) ≠ 0 := fun h ↦ hs_ne (hi_inj (h.trans (map_zero i_x).symm)) obtain ⟨c, hc⟩ := ZeroOutside.ProjectiveVanishing.stalk_zeroOutsideInt_eq_zsmul_generator V x (hUV hxU) (i_x (R.germ U x hxU s)) have hc_ne : c ≠ 0 := fun hc0 ↦ by rw [hc0, zero_smul] at hc; exact hi_s_ne hc have h_sHom_app : (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.sHomVal hRsh s).app (op U) (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.generator U) = s := Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.sHomVal_app_generator hRsh s have h_sHom_gen : sHom_x ((_root_.TopCat.Presheaf.germ (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt U).obj) U x hxU (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.generator U)) = R.germ U x hxU s := by show T.map (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.sHomVal hRsh s) _ = _ rw [TopCat.Presheaf.stalkFunctor_map_germ_apply] simpa using congrArg (R.germ U x hxU) h_sHom_app have h_surj : Function.Surjective sHom_x := by intro a; obtain ⟨k, hk⟩ := hgen a exact ⟨k • (_root_.TopCat.Presheaf.germ (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt U).obj) U x hxU (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.generator U), by rw [map_zsmul, h_sHom_gen, hk]⟩ have h_inj : Function.Injective sHom_x := by intro a b hab obtain ⟨n, rfl⟩ := ZeroOutside.ProjectiveVanishing.stalk_zeroOutsideInt_eq_zsmul_generator U x hxU a obtain ⟨m, rfl⟩ := ZeroOutside.ProjectiveVanishing.stalk_zeroOutsideInt_eq_zsmul_generator U x hxU b simp only [map_zsmul, h_sHom_gen] at hab have h_i : n • i_x (R.germ U x hxU s) = m • i_x (R.germ U x hxU s) := by rw [← map_zsmul, ← map_zsmul, hab] rw [hc, smul_comm n, smul_comm m, ← mul_smul, ← mul_smul] at h_i rw [mul_left_cancel₀ hc_ne (ZeroOutside.ProjectiveVanishing.zsmul_generator_injective V x (hUV hxU) h_i)] exact ⟨h_inj, h_surj⟩ /-- A nonzero subsheaf of `zeroOutsideInt V` has a nonzero stalk at some point of `V`. -/ theorem exists_nonzero_stalk_in_V {X : TopCat.{u}} (V : Opens X) {R : TopCat.Presheaf AddCommGrpCat.{u} X} (hRsh : R.IsSheaf) (i : R ⟶ (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj) [Mono i] (hR : ¬ IsZero R) : ∃ (x : X) (_ : x ∈ V) (a : (TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).obj R), a ≠ 0 := by let Rsh : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X := ⟨R, hRsh⟩ by_contra! h apply hR have hRsh_zero : IsZero Rsh := API.ProjectiveVanishing.sheaf_isZero_of_zero_stalks X hRsh (fun x a ↦ by by_cases hx : (x : X) ∈ (V : Set X) · exact h x hx a · have hi_inj : Function.Injective ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map i) := TopCat.Presheaf.stalkFunctor_map_injective_of_app_injective (f := i) (fun U ↦ (ConcreteCategory.mono_iff_injective_of_preservesPullback (i.app (op U))).mp ((NatTrans.mono_iff_mono_app i).mp inferInstance (op U))) x exact hi_inj ((ZeroOutside.ProjectiveVanishing.stalk_zeroOutsideInt_zero_outside V x hx _).trans (map_zero _).symm)) refine Functor.isZero R ?_ intro U have hforget_eval : (Vanishing.Projective.TopCat.Sheaf.forget AddCommGrpCat.{u} X ⋙ (evaluation (Opens X)ᵒᵖ AddCommGrpCat.{u}).obj U).PreservesZeroMorphisms := by refine ⟨?_⟩ intro A B rfl simpa using Functor.map_isZero (Vanishing.Projective.TopCat.Sheaf.forget AddCommGrpCat.{u} X ⋙ (evaluation (Opens X)ᵒᵖ AddCommGrpCat.{u}).obj U) hRsh_zero /-- At each point `x ∈ V`, the image of the stalk of `R` under `i` is a subgroup of `stalk(zeroOutsideInt V, x) ≅ ULift ℤ`. Transporting to `ℤ` and applying `Int.subgroup_cyclic`, if this image is nonzero, it has a positive generator `d_x`. The "index" `d_x` measures how deeply `R` sits inside `zeroOutsideInt V` at `x`. This lemma produces `V' ≤ V`, `V' ≠ ⊥`, and `s ∈ R(V')` such that for all `x ∈ V'`: (1) `germ(s, x) ≠ 0` (2) every stalk element of `R` at `x` is an integer multiple of `germ(s, x)`. This is the hard "Noetherian shrinking" step of Hartshorne III.2.7, Step 4. -/ theorem exists_section_generating_stalks {X : TopCat.{u}} [NoetherianSpace X] [IrreducibleSpace X] {V : Opens X} {R : TopCat.Presheaf AddCommGrpCat.{u} X} (hRsh : R.IsSheaf) (i : R ⟶ (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj) [Mono i] (hR : ¬ IsZero R) : ∃ (V' : Opens X) (_ : V' ≤ V) (_ : V' ≠ ⊥) (s : R.obj (op V')), ∀ (x : X) (hx : x ∈ V'), (R.germ V' x hx s ≠ 0) ∧ (∀ (a : (TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).obj R), ∃ k : ℤ, a = k • R.germ V' x hx s) := by let i_x (x : X) := ConcreteCategory.hom ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map i) have i_x_zero (x : X) : i_x x 0 = 0 := AddMonoidHom.map_zero _ have hi_inj (x : X) : Function.Injective (i_x x) := TopCat.Presheaf.stalkFunctor_map_injective_of_app_injective (f := i) (fun U ↦ (ConcreteCategory.mono_iff_injective_of_preservesPullback _).mp inferInstance) x let gen_at (x : X) (hx : x ∈ V) := (_root_.TopCat.Presheaf.germ (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj) V x hx (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.generator V) let H_at (x : X) (hx : x ∈ V) : AddSubgroup ℤ := (i_x x).range.comap (AddMonoidHom.mk' (fun n : ℤ ↦ n • gen_at x hx) fun m n ↦ add_smul m n _) have cyclic_generator_of_coeff {x : X} {hx : x ∈ V} {d : ℤ} {a} (hd : d ≠ 0) (ha : i_x x a = d • gen_at x hx) : ∃ e : ℕ, 0 < e ∧ (e : ℤ) ∈ H_at x hx ∧ ∀ h ∈ H_at x hx, (e : ℤ) ∣ h := by obtain ⟨e, he⟩ := Int.subgroup_cyclic (H_at x hx) exact ⟨e.natAbs, Int.natAbs_pos.mpr (fun he0 ↦ hd (by simpa [he, he0, AddSubgroup.closure_singleton_zero] using (show d ∈ H_at x hx from ⟨a, ha⟩))), by simp [he], fun h hh ↦ Int.natAbs_dvd.mpr (by simpa [he, AddSubgroup.mem_closure_singleton, dvd_def, zsmul_eq_mul, mul_comm, eq_comm] using hh)⟩ -- Step 1: P(n) holds if n > 0 and some x ∈ V has image subgroup generated by n let P : ℕ → Prop := fun n ↦ 0 < n ∧ ∃ (x : X) (hx : x ∈ V), (n : ℤ) ∈ H_at x hx ∧ ∀ h ∈ H_at x hx, (n : ℤ) ∣ h have hP : ∃ n, P n := by obtain ⟨x₀', hx₀'V, a₀', ha₀'⟩ := exists_nonzero_stalk_in_V V hRsh i hR obtain ⟨n, hn⟩ := ZeroOutside.ProjectiveVanishing.stalk_zeroOutsideInt_eq_zsmul_generator V x₀' hx₀'V (i_x x₀' a₀') exact (cyclic_generator_of_coeff (fun hn0 ↦ ha₀' <| hi_inj x₀' <| by rw [i_x_zero]; simpa only [hn0, zero_smul] using hn) hn).imp fun _ he ↦ ⟨he.1, x₀', hx₀'V, he.2.1, he.2.2⟩ classical let d : ℤ := Nat.find hP obtain ⟨hd_nat_pos, x₀, hx₀V, ⟨a₁, ha₁⟩, _⟩ := Nat.find_spec hP have hd_pos : 0 < d := Int.ofNat_lt.mpr hd_nat_pos obtain ⟨W₀, hx₀W₀, s₀, hs₀⟩ := TopCat.Presheaf.exists_germ_eq R a₁ let V₁ := W₀ ⊓ V have hV₁V : V₁ ≤ V := inf_le_right set s₁ := ConcreteCategory.hom (R.map (homOfLE (inf_le_left : V₁ ≤ W₀)).op) s₀ -- Step 5: Shrink to where germ coefficient is constant via germ_eq obtain ⟨W, hx₀W, iW1, _, hW_eq⟩ := TopCat.Presheaf.germ_eq (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj x₀ (show x₀ ∈ V₁ from ⟨hx₀W₀, hx₀V⟩) (show x₀ ∈ V₁ from ⟨hx₀W₀, hx₀V⟩) (i.app (op V₁) s₁) (d • ConcreteCategory.hom ((Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj.map (homOfLE hV₁V).op) (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.generator V)) (by rw [← TopCat.Presheaf.stalkFunctor_map_germ_apply V₁ x₀ (show x₀ ∈ V₁ from ⟨hx₀W₀, hx₀V⟩) i s₁, (TopCat.Presheaf.germ_res_apply R (homOfLE inf_le_left) x₀ (show x₀ ∈ V₁ from ⟨hx₀W₀, hx₀V⟩) s₀).trans hs₀] simpa [i_x, gen_at, d, map_zsmul, TopCat.Presheaf.germ_res_apply] using ha₁) have hWV : W ≤ V := le_trans (leOfHom iW1) hV₁V refine ⟨W, hWV, fun h ↦ (Opens.mem_bot (x := x₀)).mp (h ▸ hx₀W), ConcreteCategory.hom (R.map (homOfLE (leOfHom iW1 : W ≤ V₁)).op) s₁, fun x hxW ↦ ?_⟩ have hcoeff_x : i_x x (R.germ W x hxW (ConcreteCategory.hom (R.map (homOfLE (leOfHom iW1 : W ≤ V₁)).op) s₁)) = d • gen_at x (hWV hxW) := by simpa [i_x, gen_at, map_zsmul, TopCat.Presheaf.germ_res_apply, TopCat.Presheaf.stalkFunctor_map_germ_apply] using congrArg ((_root_.TopCat.Presheaf.germ (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj) W x hxW) hW_eq refine ⟨fun h_zero ↦ ne_of_gt hd_pos (ZeroOutside.ProjectiveVanishing.zsmul_generator_injective V x (hWV hxW) (by simpa only [zero_smul] using (hcoeff_x.symm.trans (by rw [h_zero]; exact i_x_zero x)))), fun a ↦ ?_⟩ obtain ⟨n, hn⟩ := ZeroOutside.ProjectiveVanishing.stalk_zeroOutsideInt_eq_zsmul_generator V x (hWV hxW) (i_x x a) obtain ⟨d_x, hd_x_pos, hd_x_mem, hd_x_gen⟩ := cyclic_generator_of_coeff (ne_of_gt hd_pos) hcoeff_x exact (hd_x_gen n ⟨a, hn⟩).imp fun k₀ hkn ↦ hi_inj x (by rw [map_zsmul, hn, hkn, le_antisymm (Int.le_of_dvd hd_pos (hd_x_gen d ⟨_, hcoeff_x⟩)) <| Int.ofNat_le.mpr (Nat.find_min' hP ⟨hd_x_pos, x, hWV hxW, hd_x_mem, hd_x_gen⟩), mul_comm, mul_smul, ← hcoeff_x]) /-- Core construction for Step 4: find V' ≤ V, V' ≠ ⊥, and a section s ∈ R(V') such that `sHom s: zeroOutsideInt V' ⟶ R` is a stalk-isomorphism on V'. Uses: minimum-index point, generator section, locally constant germ shrinking. -/ theorem exists_good_section {X : TopCat.{u}} [NoetherianSpace X] [IrreducibleSpace X] {V : Opens X} {R : TopCat.Presheaf AddCommGrpCat.{u} X} (hRsh : R.IsSheaf) (i : R ⟶ (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj) [Mono i] (hR : ¬ IsZero R) : ∃ (V' : Opens X) (_ : V' ≤ V) (_ : V' ≠ ⊥) (s : R.obj (op V')), ∀ (x : X) (_ : x ∈ V'), Function.Bijective (ConcreteCategory.hom ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.sHomVal hRsh s))) := by obtain ⟨V', hV'V, hV'ne, s, hgen⟩ := exists_section_generating_stalks (R := R) hRsh i hR exact ⟨V', hV'V, hV'ne, s, fun x hx ↦ sHom_stalk_bijective_at (R := R) hV'V hRsh i s x hx (hgen x hx).1 (hgen x hx).2⟩ /-- **Structure lemma** (Hartshorne Step 4 core): a nonzero subsheaf of `zeroOutsideInt V` contains `zeroOutsideInt V'` for some nonempty open `V' ⊆ V`, with the inclusion being a stalk-isomorphism on `V'`. This follows from: stalks of `Z_V` are `ℤ` or `0`, stalks of `R` are `d_x·ℤ ⊆ ℤ`, and after shrinking to an open where the multiplicity `d_x` is constant and minimal, `R` restricts to `d·Z_{V'}` ≅ `Z_{V'}`. -/ theorem subsheaf_contains_zeroOutsideInt {X : TopCat.{u}} [NoetherianSpace X] [IrreducibleSpace X] {V : Opens X} {R : TopCat.Presheaf AddCommGrpCat.{u} X} (hRsh : R.IsSheaf) (i : R ⟶ (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj) [Mono i] (hR : ¬ IsZero R) : ∃ (V' : Opens X) (_ : V' ≤ V) (_ : V' ≠ ⊥) (j : (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V').obj ⟶ R), Mono j ∧ (∀ (x : X) (_ : x ∈ V'), Function.Bijective (ConcreteCategory.hom ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map j))) := by obtain ⟨V', hle, hne, s, hbij⟩ := exists_good_section (R := R) hRsh i hR let j : (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V').obj ⟶ R := Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.sHomVal hRsh s have hj_bij : ∀ (x : X) (_ : x ∈ V'), Function.Bijective (ConcreteCategory.hom ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map j)) := by simpa [j] using hbij refine ⟨V', hle, hne, j, ?_, hj_bij⟩ have : ∀ x, Mono ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map j) := fun y ↦ by apply (ConcreteCategory.mono_iff_injective_of_preservesPullback _).mpr by_cases hy : y ∈ V' · exact (hj_bij y hy).1 · intro a b _ exact (ZeroOutside.ProjectiveVanishing.stalk_zeroOutsideInt_zero_outside V' y hy a).trans (ZeroOutside.ProjectiveVanishing.stalk_zeroOutsideInt_zero_outside V' y hy b).symm exact (NatTrans.mono_iff_mono_app j).2 fun U ↦ (ConcreteCategory.mono_iff_injective_of_preservesPullback _).2 (TopCat.Presheaf.app_injective_of_stalkFunctor_map_injective j U.unop fun x _hx ↦ (ConcreteCategory.mono_iff_injective_of_preservesPullback _).1 inferInstance) /-! ## Step 4/5 vanishing assembly -/ /-- The induction hypothesis for Grothendieck vanishing: vanishing holds for all sheaf-valued presheaves on all spaces of strictly smaller Krull dimension than X. -/ abbrev VanishingIH (dimX : WithBot ℕ∞) : Prop := ∀ (Y : TopCat.{u}) [NoetherianSpace Y] (m : ℕ) {G : TopCat.Presheaf AddCommGrpCat.{u} Y} (hG : G.IsSheaf), topologicalKrullDim Y < dimX → m > topologicalKrullDim Y → Subsingleton (Sheaf.H (⟨G, hG⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} Y) m) /-- Vanishing for a sheaf supported on the complement of an open `V`, via the closed-immersion SES on `Y = Vᶜ`. This is the support-vanishing input used by the Step 5 irreducible-space assembly immediately below. -/ theorem closedComplementVanishing {X : TopCat.{u}} [NoetherianSpace X] [IrreducibleSpace X] (V : Opens X) (hV : V ≠ ⊥) {C : TopCat.Presheaf AddCommGrpCat.{u} X} (hC : C.IsSheaf) (n : ℕ) (ih : VanishingIH.{u} (topologicalKrullDim X)) (hn : ↑n > topologicalKrullDim (Set.compl (V : Set X))) (hStalksOnV : ∀ x ∈ V, ∀ (a : (TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).obj C), a = 0) : Subsingleton (Sheaf.H (⟨C, hC⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) n) := by let Csh : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X := ⟨C, hC⟩ set Y := (V : Set X)ᶜ have hYcl : IsClosed Y := V.2.isClosed_compl have hY_dim_lt_top : topologicalKrullDim Y < ⊤ := TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_lt_top_of_lt_nat (by exact hn) have hY_dim_lt : topologicalKrullDim Y < topologicalKrullDim X := TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_lt_of_isIrreducible_of_isClosed hYcl (Set.compl_ne_univ.mpr (Set.nonempty_iff_ne_empty.mpr (Opens.coe_eq_empty.not.mpr hV))) hY_dim_lt_top let closedIncl := ClosedImmersion.ProjectiveVanishing.TopCat.closedIncl hYcl let CY := ((Vanishing.Projective.TopCat.Sheaf.pullback AddCommGrpCat.{u} closedIncl).obj Csh) let S := ClosedImmersion.ProjectiveVanishing.closedImmersionSES (Z := Y) (hZ := hYcl) Csh have hSE := ClosedImmersion.ProjectiveVanishing.closedImmersionSES_shortExact (Z := Y) (hZ := hYcl) Csh have hSX₁_zero : IsZero S.X₁ := by exact API.ProjectiveVanishing.sheaf_isZero_of_zero_stalks X S.X₁.property (fun x a ↦ by by_cases hxY : x ∈ Y · have : IsIso ((TopCat.Presheaf.stalkFunctor AddCommGrpCat.{u} x).map S.g.hom) := by exact (ClosedImmersion.ProjectiveVanishing.TopCat.closedIncl_unit_stalk_isIso (C := AddCommGrpCat.{u}) (hs := hYcl) Csh ⟨x, hxY⟩) exact API.ProjectiveVanishing.stalk_zero_of_ses_g_iso S hSE x inferInstance a · exact API.ProjectiveVanishing.stalk_zero_of_shortExact_kernel S hSE x (fun b ↦ hStalksOnV x (by rwa [Set.mem_compl_iff, not_not] at hxY) b) a) exact ClosedImmersionCohomology.ProjectiveVanishing.subsingleton_sheafH_of_closedImmersion_middle (Z := Y) (hZ := hYcl) Csh n (by simpa [S] using API.ProjectiveVanishing.sheafH_subsingleton_of_isZero hSX₁_zero n) (by simpa [closedIncl, Csh, CY] using ih (TopCat.of Y) n (G := CY.obj) CY.property hY_dim_lt hn) /-- **Step 5** (Hartshorne III.2.7): given vanishing of the cokernel of `openHom(V ≤ ⊤)` at degree `m`, deduce vanishing of `zeroOutsideInt V` at degree `m + 1`. Uses the SES `0 → zeroOutsideInt V → zeroOutsideInt ⊤ → cokernel → 0` where `zeroOutsideInt ⊤ = Z_X` (constant sheaf, flasque on irreducible spaces). -/ theorem zeroOutsideInt_vanishing {X : TopCat.{u}} [NoetherianSpace X] [IrreducibleSpace X] (V : Opens X) (m : ℕ) (hCoker : Subsingleton (Sheaf.H (Limits.cokernel (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.openHom (le_top : V ≤ ⊤))) m)) : Subsingleton (Sheaf.H (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V) (m + 1)) := by have hTop : Subsingleton (Sheaf.H (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt (⊤ : Opens X)) (m + 1)) := by simpa using FlasqueVanishing.Projective.sheafH_subsingleton_of_flasque X (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt (⊤ : Opens X)) (fun i ↦ ConstantFlasque.ProjectiveVanishing.isFlasqueSheaf_zeroOutsideInt_top X i) m exact API.ProjectiveVanishing.sheafH_dimension_shift_of_mono (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.openHom (le_top : V ≤ (⊤ : Opens X))) m hCoker hTop /-- **Step 5** (Hartshorne III.2.7): `zeroOutsideInt V` has vanishing cohomology in every degree `m > dim X` on an irreducible Noetherian space. Proof: write `m = m' + 1`, apply `zeroOutsideInt_vanishing` (SES + flasque), then prove cokernel vanishing at `m'` via the closed-immersion middle-term API, which transports cohomology along the `PushforwardHIso` closed-inclusion comparison. -/ theorem zeroOutsideInt_cohomology_vanishing {X : TopCat.{u}} [NoetherianSpace X] [IrreducibleSpace X] (V : Opens X) (hV : V ≠ ⊥) (ih : VanishingIH.{u} (topologicalKrullDim X)) (m : ℕ) (hm : m > topologicalKrullDim X) : Subsingleton (Sheaf.H (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V) m) := by let C := Limits.cokernel (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.openHom (le_top : V ≤ ⊤)) have hm_ne : m ≠ 0 := by intro h; subst h; exact absurd hm (not_lt.mpr TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_nonneg) obtain ⟨m', rfl⟩ := Nat.exists_eq_succ_of_ne_zero hm_ne have hVcompl_lt_succ : topologicalKrullDim (Set.compl (V : Set X)) < ↑↑(m' + 1 : ℕ) := TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_subspace_lt_of_lt (X := X) (Set.compl (V : Set X)) (by simpa [gt_iff_lt] using hm) have hVcompl_lt_top : topologicalKrullDim (Set.compl (V : Set X)) < ⊤ := TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_lt_top_of_lt_nat hVcompl_lt_succ have hVcompl_lt_X : topologicalKrullDim (Set.compl (V : Set X)) < topologicalKrullDim X := TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_lt_of_isIrreducible_of_isClosed V.2.isClosed_compl (Set.compl_ne_univ.mpr (Set.nonempty_iff_ne_empty.mpr (Opens.coe_eq_empty.not.mpr hV))) hVcompl_lt_top have hVcompl_lt_m' : topologicalKrullDim (Set.compl (V : Set X)) < ↑↑(m' : ℕ) := TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_lt_nat_of_lt_of_lt_nat_succ hVcompl_lt_X (by simpa [gt_iff_lt] using hm) apply zeroOutsideInt_vanishing V m' exact closedComplementVanishing V hV (C := C.obj) C.property m' ih (by simpa [gt_iff_lt] using hVcompl_lt_m') (fun x hxV a ↦ API.ProjectiveVanishing.cokernel_stalk_zero_of_stalk_surj (f := Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt.openHom (le_top : V ≤ ⊤)) (x := x) (hf := ZeroOutside.ProjectiveVanishing.sheafifyMap_zeroOutside_openHom_stalk_surj ZeroOutside.ProjectiveVanishing.TopCat.Presheaf.constZ le_top x hxV) a) /-- **Step 4** (Hartshorne III.2.7): any subsheaf of `zeroOutsideInt V` has vanishing cohomology in degree `m > dim X`. Uses `subsheaf_contains_zeroOutsideInt` to find `V' ⊆ V` with `Z_{V'} ↪ R` (stalk-iso on `V'`). The cokernel is supported on `(V')^c` (dim < dim X), so vanishes by the IH. Middle-term LES gives `H^m(R) = 0`. -/ theorem subsheaf_zeroOutsideInt_vanishing {X : TopCat.{u}} [NoetherianSpace X] [IrreducibleSpace X] {V : Opens X} {R : TopCat.Presheaf AddCommGrpCat.{u} X} (hRsh : R.IsSheaf) (i : R ⟶ (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj) [Mono i] (ih : VanishingIH.{u} (topologicalKrullDim X)) (m : ℕ) (hm : m > topologicalKrullDim X) : Subsingleton (Sheaf.H (⟨R, hRsh⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) m) := by by_cases hR : IsZero (⟨R, hRsh⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) · simpa using API.ProjectiveVanishing.sheafH_subsingleton_of_isZero hR m · obtain ⟨V', hV'le, hV'ne, j, hj_mono, hj_stalk⟩ := (by exact subsheaf_contains_zeroOutsideInt (R := R) hRsh i (by intro hR0 exact hR (IsZero.of_full_of_faithful_of_isZero (Vanishing.Projective.TopCat.Sheaf.forget AddCommGrpCat.{u} X) (⟨R, hRsh⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) hR0))) have : Mono j := hj_mono let jsh : Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V' ⟶ (⟨R, hRsh⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) := ObjectProperty.homMk j have : Mono jsh := by exact (Sheaf.Hom.mono_iff_presheaf_mono (J := Opens.grothendieckTopology X) (D := AddCommGrpCat.{u}) jsh).2 hj_mono let C : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X := cokernel jsh have hC : Subsingleton (Sheaf.H C m) := by have hV'compl_lt_nat : topologicalKrullDim (Set.compl (V' : Set X)) < ↑↑(m : ℕ) := TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_subspace_lt_of_lt (X := X) (Set.compl (V' : Set X)) hm have hV'compl_lt_top : topologicalKrullDim (Set.compl (V' : Set X)) < ⊤ := TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_lt_top_of_lt_nat hV'compl_lt_nat have hV'compl_lt_X : topologicalKrullDim (Set.compl (V' : Set X)) < topologicalKrullDim X := TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_lt_of_isIrreducible_of_isClosed V'.2.isClosed_compl (Set.compl_ne_univ.mpr (Set.nonempty_iff_ne_empty.mpr (Opens.coe_eq_empty.not.mpr hV'ne))) hV'compl_lt_top exact closedComplementVanishing V' hV'ne (C := C.obj) C.property m ih (by simpa [gt_iff_lt] using lt_trans hV'compl_lt_X hm) (fun x hxV' b ↦ API.ProjectiveVanishing.cokernel_stalk_zero_of_stalk_surj (F := Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V') (G := (⟨R, hRsh⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)) (f := jsh) (x := x) (hf := (hj_stalk x hxV').2) b) exact API.ProjectiveVanishing.subsingleton_sheafH_of_shortExact_middle jsh m (zeroOutsideInt_cohomology_vanishing V' hV'ne ih m hm) (by simpa [C] using hC) /-- **Steps 3C + 4 + LES** (Hartshorne III.2.7): any locally surjective image of `zeroOutsideInt V` has vanishing cohomology in degree `m > dim X`. Uses third-term LES with `zeroOutsideInt_cohomology_vanishing` (Step 5) and `subsheaf_zeroOutsideInt_vanishing` (Step 4). -/ theorem epiImage_zeroOutsideInt_vanishing_of_locallySurjective {X : TopCat.{u}} [NoetherianSpace X] [IrreducibleSpace X] {V : Opens X} {G : TopCat.Presheaf AddCommGrpCat.{u} X} (hG : G.IsSheaf) (f : (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj ⟶ G) (hf : TopCat.Presheaf.IsLocallySurjective f) (ih : VanishingIH.{u} (topologicalKrullDim X)) (m : ℕ) (hm : m > topologicalKrullDim X) : Subsingleton (Sheaf.H (⟨G, hG⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) m) := by let : Balanced (CategoryTheory.Sheaf (Opens.grothendieckTopology X) AddCommGrpCat.{u}) := balanced_of_strongEpiCategory by_cases hV : V = ⊥ · subst hV have : Epi (show Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt (⊥ : Opens X) ⟶ (⟨G, hG⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) from ObjectProperty.homMk f) := by rw [← Sheaf.isLocallySurjective_iff_epi' AddCommGrpCat.{u} (show Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt (⊥ : Opens X) ⟶ (⟨G, hG⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) from ObjectProperty.homMk f)] exact hf have hZero : IsZero ((⟨G, hG⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X)) := (ZeroOutside.ProjectiveVanishing.isZero_zeroOutsideInt_bot X).of_epi (show Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt (⊥ : Opens X) ⟶ (⟨G, hG⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) from ObjectProperty.homMk f) simpa using API.ProjectiveVanishing.sheafH_subsingleton_of_isZero hZero m · let fsh : Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V ⟶ (⟨G, hG⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) := ObjectProperty.homMk f have hkernel : Subsingleton (Sheaf.H (kernel fsh) (m + 1)) := by have : Mono (kernel.ι fsh).hom := Functor.map_mono (Vanishing.Projective.TopCat.Sheaf.forget AddCommGrpCat.{u} X) (kernel.ι fsh) simpa [fsh] using subsheaf_zeroOutsideInt_vanishing (R := (kernel fsh).obj) (kernel fsh).property (kernel.ι fsh).hom ih (m + 1) (lt_trans hm (by exact_mod_cast Nat.lt_succ_of_le le_rfl)) simpa using API.ProjectiveVanishing.sheafH_dimension_shift_X₃_of_locallySurjective fsh (by simpa [fsh] using hf) m (zeroOutsideInt_cohomology_vanishing V hV ih m hm) hkernel -- Filtered diagram infrastructure, finitely generated vanishing, and -- directLimit_cohomology_vanishing are in FinitelyGeneratedVanishing.lean. /-- **Irreducible positive-dimensional vanishing** (Hartshorne III.2.7, irreducible case). Uses the closed immersion step and induction on a proper closed subset. -/ theorem irreducible_pos_vanishing {X : TopCat.{u}} [NoetherianSpace X] [IrreducibleSpace X] {F : TopCat.Presheaf AddCommGrpCat.{u} X} (hF : F.IsSheaf) (hpos : topologicalKrullDim X > 0) (n : ℕ) (hn : n > topologicalKrullDim X) (ih : VanishingIH.{u} (topologicalKrullDim X)) : Subsingleton (Sheaf.H (⟨F, hF⟩ : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X) n) := by let Fsh : Vanishing.Projective.TopCat.Sheaf AddCommGrpCat.{u} X := ⟨F, hF⟩ change Subsingleton (Sheaf.H Fsh n) have hX_lt_top : topologicalKrullDim X < ⊤ := TopologicalKrullDim.ProjectiveVanishing.topologicalKrullDim_lt_top_of_lt_nat (by exact hn) obtain ⟨Z, hZ_closed, _, hZ_dim⟩ := TopologicalKrullDim.ProjectiveVanishing.exists_closed_subset_lt_topologicalKrullDim_of_irreducible_pos (X := X) hpos hX_lt_top have hn_Z : n > topologicalKrullDim (TopCat.of Z) := by simpa [gt_iff_lt] using lt_trans hZ_dim (by simpa [gt_iff_lt] using hn) let i := ClosedImmersion.ProjectiveVanishing.TopCat.closedIncl hZ_closed let FZ := ((Vanishing.Projective.TopCat.Sheaf.pullback AddCommGrpCat.{u} i).obj Fsh) let S := ClosedImmersion.ProjectiveVanishing.closedImmersionSES (Z := Z) (hZ := hZ_closed) Fsh have hKer : Subsingleton (Sheaf.H S.X₁ n) := FinitelyGeneratedVanishing.Projective.directLimit_cohomology_vanishing (K := S.X₁.obj) S.X₁.property n (fun {G} (hG : G.IsSheaf) {V} (f : (Vanishing.Projective.TopCat.Sheaf.zeroOutsideInt V).obj ⟶ G) hf => by exact epiImage_zeroOutsideInt_vanishing_of_locallySurjective (V := V) (G := G) hG f hf ih n hn) exact ClosedImmersionCohomology.ProjectiveVanishing.subsingleton_sheafH_of_closedImmersion_middle (Z := Z) (hZ := hZ_closed) Fsh n (by simpa [S] using hKer) (by simpa [i, Fsh, FZ] using ih (TopCat.of Z) n (G := FZ.obj) FZ.property hZ_dim hn_Z) end ProjectiveVanishing end OAI.AlgebraicGeometry.SheafCohomology.IrreducibleStep