Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f4039f4
working state
Nov 1, 2024
cb6065b
organize imports
Nov 1, 2024
7a12b7b
add documentation
Nov 1, 2024
0a7bd9a
factor grothendieck categories out into a new file
datokrat Nov 10, 2024
f6f0046
move unrelated changes to datokrat/GrothendieckAxioms
datokrat Nov 10, 2024
c827ad8
fix imports
datokrat Nov 10, 2024
e403d96
simplify
datokrat Nov 10, 2024
6e51dcc
straighten lemma
datokrat Nov 10, 2024
bf2bc29
oops, forgot to update Mathlib.lean
datokrat Nov 10, 2024
16fefcb
Merge remote-tracking branch 'origin/master' into datokrat/FME-80
datokrat Nov 10, 2024
4e47dc0
stacks attributes
datokrat Nov 16, 2024
0842c5f
Merge branch 'master' into datokrat/FME-80
datokrat Nov 16, 2024
3166f62
make preconditions of GrothendieckCategory fields
datokrat Nov 18, 2024
bda7744
Merge remote-tracking branch 'origin/master' into datokrat/FME-80
datokrat Dec 4, 2024
33b74b3
Merge remote-tracking branch 'origin/master' into datokrat/FME-80
datokrat Dec 7, 2024
c79a861
new definition, ugly proof
datokrat Dec 7, 2024
78c210a
equivalence lemma for IsGrothendieckAbelian
datokrat Dec 7, 2024
b3c765a
snapshot
datokrat Dec 8, 2024
02ddcdf
cleanup
datokrat Dec 8, 2024
f735ee9
cleanup
datokrat Dec 8, 2024
86fadf3
more cleanup
datokrat Dec 8, 2024
102bc3e
have -> haveI
datokrat Dec 9, 2024
383fd44
wip
datokrat Dec 14, 2024
9a32c37
Merge remote-tracking branch 'origin/master' into datokrat/FME-80
datokrat Dec 14, 2024
82d82f7
feat(CategoryTheory/Sites): categories of sites have a separator
joelriou Dec 15, 2024
ea2d7ae
cleaning up
joelriou Dec 15, 2024
a66a6ee
fixing imports
joelriou Dec 15, 2024
9bd83cd
has limits and colimits
datokrat Dec 15, 2024
83457ae
better docstring
joelriou Dec 15, 2024
ff4fee0
Has(Co)LimitsOfShape adjustments
datokrat Dec 15, 2024
1844a75
fix Mathlib.lean
datokrat Dec 15, 2024
6dbbef0
make IsSeparating.of_equivalence more convenient and dualize
datokrat Dec 15, 2024
239174e
add HasCoseparator.of_equivalence and extend docstring
datokrat Dec 15, 2024
3cfcd10
Merge remote-tracking branch 'origin/sheaf-has-separator' into sheaf-…
joelriou Dec 15, 2024
488c803
process some remarks and fix linter error
datokrat Dec 15, 2024
0a58d78
use camel case
datokrat Dec 15, 2024
de7aa90
remove empty line
datokrat Dec 15, 2024
9679326
remove unused import
datokrat Dec 15, 2024
1bccbf1
feat(CategoryTheory/Sites): categories of sheaves are Grothendieck ab…
joelriou Dec 16, 2024
2882f82
typo
joelriou Dec 16, 2024
79ea57d
wip
joelriou Dec 16, 2024
8d7caab
extend docstrings, process remarks
datokrat Dec 16, 2024
8bd714f
clarify docstring
datokrat Dec 16, 2024
9df4421
hasLimitsOfShape
datokrat Dec 16, 2024
6e666d5
Merge remote-tracking branch 'origin/datokrat/FME-80' into sheaf-grot…
joelriou Dec 16, 2024
c670459
Merge remote-tracking branch 'origin' into sheaf-grothendieck-abelian
joelriou Dec 16, 2024
049de14
Merge remote-tracking branch 'origin' into sheaf-has-separator
joelriou Dec 16, 2024
2dd7406
fix
joelriou Dec 16, 2024
9414d3b
fix
joelriou Dec 16, 2024
6a04477
fix docstring
joelriou Dec 16, 2024
17c90c0
fix
joelriou Dec 16, 2024
3ffba9f
Merge remote-tracking branch 'origin' into sheaf-has-separator
joelriou Dec 24, 2024
12008de
Merge remote-tracking branch 'origin/sheaf-has-separator' into sheaf-…
joelriou Dec 24, 2024
1e0c193
Merge remote-tracking branch 'origin' into sheaf-grothendieck-abelian
joelriou Dec 24, 2024
fe42daf
cleaning up
joelriou Dec 25, 2024
5542e40
better docstring
joelriou Dec 25, 2024
325c854
Update Mathlib/CategoryTheory/Abelian/GrothendieckAxioms/Sheaf.lean
joelriou Dec 26, 2024
3b6f01e
Merge remote-tracking branch 'origin' into sheaf-grothendieck-abelian
joelriou Dec 26, 2024
4b0a487
Update Mathlib/CategoryTheory/Abelian/GrothendieckAxioms/Sheaf.lean
joelriou Dec 26, 2024
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
43 changes: 42 additions & 1 deletion Mathlib/CategoryTheory/Abelian/GrothendieckAxioms/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ open Limits

attribute [instance] comp_preservesFiniteLimits comp_preservesFiniteColimits

universe w w' w₂ w₂' v v' u u'
universe w w' w₂ w₂' v v' v'' u u' u''

variable (C : Type u) [Category.{v} C]

Expand Down Expand Up @@ -168,6 +168,47 @@ lemma HasExactLimitsOfShape.of_codomain_equivalence (J : Type*) [Category J] {D
apply e.symm.congrRight.fullyFaithfulFunctor.preimageIso
exact isoWhiskerLeft (_ ⋙ lim) e.unitIso.symm ≪≫ (preservesLimitNatIso e.inverse).symm

namespace Adjunction

variable {C} {D : Type u''} [Category.{v''} D] {F : C ⥤ D} {G : D ⥤ C}

/-- Let `adj : F ⊣ G` be an adjunction, with `G : D ⥤ C` reflective.
Assume that `D` has finite limits and `F` commutes to them.
If `C` has exact colimits of shape `J`, then `D` also has exact colimits of shape `J`. -/
lemma hasExactColimitsOfShape (adj : F ⊣ G) [G.Full] [G.Faithful]
(J : Type u') [Category.{v'} J] [HasColimitsOfShape J C] [HasColimitsOfShape J D]
[HasExactColimitsOfShape J C] [HasFiniteLimits D] [PreservesFiniteLimits F] :
HasExactColimitsOfShape J D where
preservesFiniteLimits := ⟨fun K _ _ ↦ ⟨fun {H} ↦ by
have : PreservesLimitsOfSize.{0, 0} G := adj.rightAdjoint_preservesLimits
have : PreservesColimitsOfSize.{v', u'} F := adj.leftAdjoint_preservesColimits
let e : (whiskeringRight J D C).obj G ⋙ colim ⋙ F ≅ colim :=
isoWhiskerLeft _ (preservesColimitNatIso F) ≪≫ (Functor.associator _ _ _).symm ≪≫
isoWhiskerRight (whiskeringRightObjCompIso G F) _ ≪≫
isoWhiskerRight ((whiskeringRight J D D).mapIso (asIso adj.counit)) _ ≪≫
isoWhiskerRight wiskeringRightObjIdIso _ ≪≫ colim.leftUnitor
exact preservesLimit_of_natIso _ e⟩⟩

/-- Let `adj : F ⊣ G` be an adjunction, with `F : C ⥤ D` coreflective.
Assume that `C` has finite colimits and `G` commutes to them.
If `D` has exact limits of shape `J`, then `C` also has exact limits of shape `J`. -/
lemma hasExactLimitsOfShape (adj : F ⊣ G) [F.Full] [F.Faithful]
(J : Type u') [Category.{v'} J] [HasLimitsOfShape J C] [HasLimitsOfShape J D]
[HasExactLimitsOfShape J D] [HasFiniteColimits C] [PreservesFiniteColimits G] :
HasExactLimitsOfShape J C where
preservesFiniteColimits:= ⟨fun K _ _ ↦ ⟨fun {H} ↦ by
have : PreservesLimitsOfSize.{v', u'} G := adj.rightAdjoint_preservesLimits
have : PreservesColimitsOfSize.{0, 0} F := adj.leftAdjoint_preservesColimits
let e : (whiskeringRight J _ _).obj F ⋙ lim ⋙ G ≅ lim :=
isoWhiskerLeft _ (preservesLimitNatIso G) ≪≫
(Functor.associator _ _ _).symm ≪≫
isoWhiskerRight (whiskeringRightObjCompIso F G) _ ≪≫
isoWhiskerRight ((whiskeringRight J C C).mapIso (asIso adj.unit).symm) _ ≪≫
isoWhiskerRight wiskeringRightObjIdIso _ ≪≫ lim.leftUnitor
exact preservesColimit_of_natIso _ e⟩⟩

end Adjunction

/--
A category `C` which has coproducts is said to have `AB4` of size `w` provided that
coproducts of size `w` are exact.
Expand Down
65 changes: 53 additions & 12 deletions Mathlib/CategoryTheory/Abelian/GrothendieckAxioms/Sheaf.lean
Original file line number Diff line number Diff line change
@@ -1,32 +1,73 @@
/-
Copyright (c) 2024 Dagur Asgeirsson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dagur Asgeirsson
Authors: Dagur Asgeirsson, Joël Riou
-/
import Mathlib.CategoryTheory.Abelian.GrothendieckAxioms.FunctorCategory
import Mathlib.CategoryTheory.Sites.Limits
import Mathlib.CategoryTheory.Abelian.GrothendieckCategory
import Mathlib.CategoryTheory.Generator.Sheaf
import Mathlib.CategoryTheory.Sites.Abelian

/-!

# AB axioms in sheaf categories

This file proves that, when the relevant limits and colimits and sheafification exist, exactness of
limits and colimits carries over from `A` to categories of `A`-valued sheaves.
If `J` is a Grothendieck topology on a small category `C : Type v`,
and `A : Type u₁` (with `Category.{v} A`) is a Grothendieck abelian category,
then `Sheaf J A` is a Grothendieck abelian category.

-/

universe v v₁ v₂ u u₁ u₂

namespace CategoryTheory

open Limits

variable {A C J : Type*} [Category A] [Category C] [Category J]
namespace Sheaf

variable {C : Type u} {A : Type u₁} {K : Type u₂}
[Category.{v} C] [Category.{v₁} A] [Category.{v₂} K]
(J : GrothendieckTopology C)

section

/- The two instances in this section apply in very rare situations, as they assume
that the forgetful functor from sheaves to presheaves commutes with certain colimits.
This does apply for sheaves for the extensive topology --- condensed modules over a
ring are examples of such sheaves. -/

variable [HasWeakSheafify J A]

instance [HasFiniteLimits A] [HasColimitsOfShape K A] [HasExactColimitsOfShape K A]
[PreservesColimitsOfShape K (sheafToPresheaf J A)] : HasExactColimitsOfShape K (Sheaf J A) :=
HasExactColimitsOfShape.domain_of_functor K (sheafToPresheaf J A)

instance [HasFiniteColimits A] [HasLimitsOfShape K A] [HasExactLimitsOfShape K A]
[PreservesFiniteColimits (sheafToPresheaf J A)] : HasExactLimitsOfShape K (Sheaf J A) :=
HasExactLimitsOfShape.domain_of_functor K (sheafToPresheaf J A)

end

instance hasFilteredColimitsOfSize
[HasSheafify J A] [HasFilteredColimitsOfSize.{v₂, u₂} A] :
HasFilteredColimitsOfSize.{v₂, u₂} (Sheaf J A) where
HasColimitsOfShape K := by infer_instance

instance hasExactColimitsOfShape [HasFiniteLimits A] [HasSheafify J A]
[HasColimitsOfShape K A] [HasExactColimitsOfShape K A] :
HasExactColimitsOfShape K (Sheaf J A) :=
(sheafificationAdjunction J A).hasExactColimitsOfShape K

variable (K : GrothendieckTopology C) [HasWeakSheafify K A]
instance ab5ofSize [HasFiniteLimits A] [HasSheafify J A]
[HasFilteredColimitsOfSize.{v₂, u₂} A] [AB5OfSize.{v₂, u₂} A] :
AB5OfSize.{v₂, u₂} (Sheaf J A) where
ofShape K _ _ := by infer_instance

instance [HasFiniteLimits A] [HasColimitsOfShape J A] [HasExactColimitsOfShape J A]
[PreservesColimitsOfShape J (sheafToPresheaf K A)] : HasExactColimitsOfShape J (Sheaf K A) :=
HasExactColimitsOfShape.domain_of_functor J (sheafToPresheaf K A)
instance {C : Type v} [SmallCategory.{v} C] (J : GrothendieckTopology C)
(A : Type u₁) [Category.{v} A] [Abelian A] [IsGrothendieckAbelian.{v} A]
[HasSheafify J A] : IsGrothendieckAbelian.{v} (Sheaf J A) where

instance [HasFiniteColimits A] [HasLimitsOfShape J A] [HasExactLimitsOfShape J A]
[PreservesFiniteColimits (sheafToPresheaf K A)] : HasExactLimitsOfShape J (Sheaf K A) :=
HasExactLimitsOfShape.domain_of_functor J (sheafToPresheaf K A)
end Sheaf

end CategoryTheory