Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
3c7b116
feat(SheafCohomology): add long exact sequence and equivalences for c…
Brian-Nugent Feb 3, 2026
87012ea
fix(SheafCohomology): correct formatting in theorem H.Equiv₀_comp
Brian-Nugent Feb 3, 2026
b148e3d
fix(ForgetCorepresentable): improve formatting in uliftZMultiplesHom.…
Brian-Nugent Feb 3, 2026
97fef29
fix(SheafCohomology): rename H.Equiv₀ to H.equiv₀ for consistency
Brian-Nugent Feb 3, 2026
0fa3a22
Update Mathlib/CategoryTheory/Sites/SheafCohomology/Basic.lean
Brian-Nugent Feb 11, 2026
0d5ebe4
fix(SheafCohomology): simplify Additive instance for constant sheaf
Brian-Nugent Feb 11, 2026
9bd441d
fix(SheafCohomology): remove unused long sequence definitions and add…
Brian-Nugent Feb 19, 2026
3d5637e
fix(Abelian): remove unused imports for cleaner code
Brian-Nugent Feb 19, 2026
c585e42
fix(SheafCohomology): enhance cohomology definitions and properties f…
Brian-Nugent Feb 27, 2026
3a4143f
feat(SheafCohomology): add Hfunctor for sheaf cohomology and its prop…
Brian-Nugent Mar 4, 2026
b20f7fe
Define Hfunctor as a functor in Sheaf Cohomology
Brian-Nugent Mar 4, 2026
5f43b69
feat(SheafCohomology): implement functorH and related lemmas for shea…
Brian-Nugent Mar 5, 2026
6be2c1f
feat(SheafCohomology): refactor functorHNatIsoSheafSections for impro…
Brian-Nugent Mar 5, 2026
54a5d63
refactor(SheafCohomology): rename theorems for improved clarity and c…
Brian-Nugent Mar 5, 2026
276afe2
Merge branch 'master' into sheaf_coho
Brian-Nugent Mar 7, 2026
87a1ebf
Changed to new sheaf projections
Brian-Nugent Mar 7, 2026
cf28c41
Merge branch 'master' into sheaf_coho
Brian-Nugent Mar 12, 2026
4639699
Add simp lemmas
Brian-Nugent Mar 21, 2026
868205e
Merge branch 'master' into sheaf_coho
Brian-Nugent Mar 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Mathlib/Algebra/Category/Grp/ForgetCorepresentable.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module

public import Mathlib.Algebra.Category.Grp.Basic
public import Mathlib.CategoryTheory.Yoneda
public import Mathlib.Algebra.Category.Grp.Preadditive

/-!
# The forget functor is corepresentable
Expand Down Expand Up @@ -79,3 +80,13 @@ instance AddGrpCat.forget_isCorepresentable :
instance AddCommGrpCat.forget_isCorepresentable :
(forget AddCommGrpCat.{u}).IsCorepresentable :=
Functor.IsCorepresentable.mk' AddCommGrpCat.coyonedaObjIsoForget

theorem uliftZMultiplesHom.add (G : Type u) [AddCommGroup G] (x y : G) :
(uliftZMultiplesHom G) (x + y) = ((uliftZMultiplesHom G) x) + ((uliftZMultiplesHom G) y) := by
ext
simp_all only [uliftZMultiplesHom_apply_apply, smul_add, AddMonoidHom.add_apply]

/-- The additive equivalence `(ℤ ⟶ G) ≃+ G` -/
def AddCommGrpCat.uliftZMultiplesAddEquiv (G : AddCommGrpCat) : (of (ULift ℤ) ⟶ G) ≃+ ↑G :=
AddEquiv.trans (@AddCommGrpCat.homAddEquiv (AddCommGrpCat.of (ULift ℤ)) G)
(AddEquiv.mk' (uliftZMultiplesHom G) (uliftZMultiplesHom.add G)).symm
65 changes: 65 additions & 0 deletions Mathlib/CategoryTheory/Sites/SheafCohomology/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public import Mathlib.Algebra.Category.Grp.Adjunctions
public import Mathlib.Algebra.Homology.DerivedCategory.Ext.Basic
public import Mathlib.CategoryTheory.Sites.Abelian
public import Mathlib.CategoryTheory.Sites.ConstantSheaf
public import Mathlib.Algebra.Homology.DerivedCategory.Ext.EnoughInjectives
public import Mathlib.Algebra.Category.Grp.Zero
public import Mathlib.CategoryTheory.Adjunction.Additive

/-!
# Sheaf cohomology
Expand Down Expand Up @@ -85,6 +88,68 @@ noncomputable abbrev cohomologyPresheaf (F : Sheaf J AddCommGrpCat.{v}) (n : ℕ

end

section

variable [HasSheafify J AddCommGrpCat.{w}] [HasExt.{w'} (Sheaf J AddCommGrpCat.{w})]

theorem H.eq_zero_of_injective (F : Sheaf J AddCommGrpCat.{w}) (n : ℕ) (x : H F (n + 1))
[Injective F] : x = 0 :=
Ext.eq_zero_of_injective x

variable {S : ShortComplex (Sheaf J AddCommGrpCat.{w})} (hS : S.ShortExact) (n₀ n₁ : ℕ)
(h : n₀ + 1 = n₁)

/-- The long exact sequence on cohomology obtained from a short exact sequence of sheaves:
If `S` is a short exact sequence of abelian sheaves, then this is the sequence
`H S.X₁ n₀ → H S.X₂ n₀ → H S.X₃ n₀ → H S.X₁ n₁ → H S.X₂ n₁ → H S.X₃ n₁` when `n₀ + 1 = n₁` -/
noncomputable def H.longSequence (h : n₀ + 1 = n₁ := by lia) : ComposableArrows AddCommGrpCat 5 :=
Ext.covariantSequence ((constantSheaf J AddCommGrpCat.{w}).obj (AddCommGrpCat.of.{w} (ULift ℤ)))
hS n₀ n₁ h

theorem H.longSequence.exact (h : n₀ + 1 = n₁ := by lia) : (H.longSequence hS n₀ n₁ h).Exact :=
Ext.covariantSequence_exact ((constantSheaf J AddCommGrpCat).obj (AddCommGrpCat.of (ULift ℤ)))
hS n₀ n₁ h

instance : (Functor.const Cᵒᵖ : AddCommGrpCat ⥤ Cᵒᵖ ⥤ AddCommGrpCat).Additive where

instance : (constantSheaf J AddCommGrpCat).Additive :=
inferInstanceAs (Functor.const _ ⋙ presheafToSheaf _ _).Additive

variable (F : Sheaf J AddCommGrpCat.{w}) {T : C} (hT : Limits.IsTerminal T)

open AddCommGrpCat Opposite

/-- The additive equivalence between `H F 0` and the evaluation of `F` at the terminal object -/
noncomputable def H.equiv₀ : H F 0 ≃+ ((sheafSections J AddCommGrpCat).obj (op T)).obj F :=
AddEquiv.trans Ext.addEquiv₀ (
AddEquiv.trans ((constantSheafAdj J AddCommGrpCat hT).homAddEquiv _ F)
(uliftZMultiplesAddEquiv _))

variable {F G : Sheaf J AddCommGrpCat.{w}} (f : F ⟶ G)

/-- Given a morphism of sheaves `f : F ⟶ G`, `H.map f n` is the induced additive map on cohomology
groups `H F n →+ H G n` -/
noncomputable def H.map (n : ℕ) : H F n →+ H G n :=
((Ext.mk₀ f).postcomp ((constantSheaf J AddCommGrpCat).obj (of (ULift ℤ))) (add_zero n))

lemma H.addEquiv₀_comp (x : H F 0) : Ext.addEquiv₀ (H.map f 0 x) = Ext.addEquiv₀ x ≫ f := by
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lemma H.addEquiv₀_comp (x : H F 0) : Ext.addEquiv₀ (H.map f 0 x) = Ext.addEquiv₀ x ≫ f := by
@[reassoc]
lemma H.addEquiv₀_map (x : H F 0) : Ext.addEquiv₀ (H.map f 0 x) = Ext.addEquiv₀ x ≫ f := by

delta Ext.addEquiv₀ H.map
apply (Ext.mk₀_bijective _ G).injective
simp only [AddEquiv.coe_mk, Ext.mk₀_homEquiv₀_apply, Ext.mk₀_homEquiv₀_apply, ← Ext.mk₀_comp_mk₀]
rfl

/-- `H.Equiv₀` is natural -/
theorem H.Equiv₀_comp (x : H F 0) :
((sheafSections J AddCommGrpCat).obj (op T)).map f (H.equiv₀ F hT x) =
H.equiv₀ G hT (H.map f 0 x) := by
delta equiv₀
simp only [Functor.flip_obj_obj, sheafToPresheaf_obj, Functor.flip_obj_map, sheafToPresheaf_map,
AddEquiv.trans_apply]
conv => rhs; right; right; equals Ext.addEquiv₀ x ≫ f => exact addEquiv₀_comp f x
rfl

end

end Sheaf

end CategoryTheory