# mathlibdocumentation

category_theory.sites.grothendieck

# Grothendieck topologies #

Definition and lemmas about Grothendieck topologies. A Grothendieck topology for a category C is a set of sieves on each object X satisfying certain closure conditions.

Alternate versions of the axioms (in arrow form) are also described. Two explicit examples of Grothendieck topologies are given:

• The dense topology
• The atomic topology as well as the complete lattice structure on Grothendieck topologies (which gives two additional explicit topologies: the discrete and trivial topologies.)

A pretopology, or a basis for a topology is defined in pretopology.lean. The topology associated to a topological space is defined in spaces.lean.

## Tags #

Grothendieck topology, coverage, pretopology, site

## Implementation notes #

We use the definition of [nlab] and [MM92][] (Chapter III, Section 2), where Grothendieck topologies are saturated collections of morphisms, rather than the notions of the Stacks project (00VG) and the Elephant, in which topologies are allowed to be unsaturated, and are then completed. TODO (BM): Add the definition from Stacks, as a pretopology, and complete to a topology.

This is so that we can produce a bijective correspondence between Grothendieck topologies on a small category and Lawvere-Tierney topologies on its presheaf topos, as well as the equivalence between Grothendieck topoi and left exact reflective subcategories of presheaf toposes.

structure category_theory.grothendieck_topology (C : Type u)  :
Type (max u v)
• sieves : Π (X : C),
• top_mem' : ∀ (X : C), self.sieves X
• pullback_stable' : ∀ ⦃X Y : C⦄ ⦃S : ⦄ (f : Y X), S self.sieves X self.sieves Y
• transitive' : ∀ ⦃X : C⦄ ⦃S : ⦄, S self.sieves X∀ (R : , (∀ ⦃Y : C⦄ ⦃f : Y X⦄, S f self.sieves Y)R self.sieves X

The definition of a Grothendieck topology: a set of sieves J X on each object X satisfying three axioms:

1. For every object X, the maximal sieve is in J X.
2. If S ∈ J X then its pullback along any h : Y ⟶ X is in J Y.
3. If S ∈ J X and R is a sieve on X, then provided that the pullback of R along any arrow f : Y ⟶ X in S is in J Y, we have that R itself is in J X.

A sieve S on X is referred to as J-covering, (or just covering), if S ∈ J X.

See https://stacks.math.columbia.edu/tag/00Z4, or [nlab], or [MM92][] Chapter III, Section 2, Definition 1.

Instances for category_theory.grothendieck_topology
@[protected, instance]
def category_theory.grothendieck_topology.has_coe_to_fun (C : Type u)  :
(λ (_x : , Π (X : C),
Equations
@[ext]
theorem category_theory.grothendieck_topology.ext {C : Type u} {J₁ J₂ : category_theory.grothendieck_topology C} (h : J₁ = J₂) :
J₁ = J₂

An extensionality lemma in terms of the coercion to a pi-type. We prove this explicitly rather than deriving it so that it is in terms of the coercion rather than the projection .sieves.

@[simp]
@[simp]
theorem category_theory.grothendieck_topology.top_mem {C : Type u} (X : C) :
@[simp]
theorem category_theory.grothendieck_topology.pullback_stable {C : Type u} {X Y : C} {S : category_theory.sieve X} (f : Y X) (hS : S J X) :
theorem category_theory.grothendieck_topology.transitive {C : Type u} {X : C} {S : category_theory.sieve X} (hS : S J X) (R : category_theory.sieve X) (h : ∀ ⦃Y : C⦄ ⦃f : Y X⦄, S f) :
R J X
theorem category_theory.grothendieck_topology.superset_covering {C : Type u} {X : C} {S R : category_theory.sieve X} (Hss : S R) (sjx : S J X) :
R J X

If S is a subset of R, and S is covering, then R is covering as well.

See https://stacks.math.columbia.edu/tag/00Z5 (2), or discussion after [MM92] Chapter III, Section 2, Definition 1.

theorem category_theory.grothendieck_topology.intersection_covering {C : Type u} {X : C} {S R : category_theory.sieve X} (rj : R J X) (sj : S J X) :
R S J X

The intersection of two covering sieves is covering.

See https://stacks.math.columbia.edu/tag/00Z5 (1), or [MM92] Chapter III, Section 2, Definition 1 (iv).

@[simp]
theorem category_theory.grothendieck_topology.bind_covering {C : Type u} {X : C} {S : category_theory.sieve X} {R : Π ⦃Y : C⦄ ⦃f : Y X⦄, S f} (hS : S J X) (hR : ∀ ⦃Y : C⦄ ⦃f : Y X⦄ (H : S f), R H J Y) :
def category_theory.grothendieck_topology.covers {C : Type u} {X Y : C} (S : category_theory.sieve X) (f : Y X) :
Prop

The sieve S on X J-covers an arrow f to X if S.pullback f ∈ J Y. This definition is an alternate way of presenting a Grothendieck topology.

Equations
theorem category_theory.grothendieck_topology.covers_iff {C : Type u} {X Y : C} (S : category_theory.sieve X) (f : Y X) :
J.covers S f
theorem category_theory.grothendieck_topology.arrow_max {C : Type u} {X Y : C} (f : Y X) (S : category_theory.sieve X) (hf : S f) :
J.covers S f

The maximality axiom in 'arrow' form: Any arrow f in S is covered by S.

theorem category_theory.grothendieck_topology.arrow_stable {C : Type u} {X Y : C} (f : Y X) (S : category_theory.sieve X) (h : J.covers S f) {Z : C} (g : Z Y) :
J.covers S (g f)

The stability axiom in 'arrow' form: If S covers f then S covers g ≫ f for any g.

theorem category_theory.grothendieck_topology.arrow_trans {C : Type u} {X Y : C} (f : Y X) (S R : category_theory.sieve X) (h : J.covers S f) :
(∀ {Z : C} (g : Z X), S gJ.covers R g)J.covers R f

The transitivity axiom in 'arrow' form: If S covers f and every arrow in S is covered by R, then R covers f.

theorem category_theory.grothendieck_topology.arrow_intersect {C : Type u} {X Y : C} (f : Y X) (S R : category_theory.sieve X) (hS : J.covers S f) (hR : J.covers R f) :
J.covers (S R) f

The trivial Grothendieck topology, in which only the maximal sieve is covering. This topology is also known as the indiscrete, coarse, or chaotic topology.

See [MM92] Chapter III, Section 2, example (a), or https://en.wikipedia.org/wiki/Grothendieck_topology#The_discrete_and_indiscrete_topologies

Equations

The discrete Grothendieck topology, in which every sieve is covering.

Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]

Construct a complete lattice from the Inf, but make the trivial and discrete topologies definitionally equal to the bottom and top respectively.

Equations
@[protected, instance]
Equations
@[simp]
@[simp]
@[simp]
@[simp]
theorem category_theory.grothendieck_topology.bot_covers {C : Type u} {X Y : C} (S : category_theory.sieve X) (f : Y X) :
.covers S f S f
@[simp]
theorem category_theory.grothendieck_topology.top_covers {C : Type u} {X Y : C} (S : category_theory.sieve X) (f : Y X) :

The dense Grothendieck topology.

See https://ncatlab.org/nlab/show/dense+topology, or [MM92] Chapter III, Section 2, example (e).

Equations
theorem category_theory.grothendieck_topology.dense_covering {C : Type u} {X : C} {S : category_theory.sieve X} :
∀ {Y : C} (f : Y X), ∃ (Z : C) (g : Z Y), S (g f)

A category satisfies the right Ore condition if any span can be completed to a commutative square. NB. Any category with pullbacks obviously satisfies the right Ore condition, see right_ore_of_pullbacks.

Equations
• = ∀ {X Y Z : C} (yx : Y X) (zx : Z X), ∃ (W : C) (wy : W Y) (wz : W Z), wy yx = wz zx

The atomic Grothendieck topology: a sieve is covering iff it is nonempty. For the pullback stability condition, we need the right Ore condition to hold.

See https://ncatlab.org/nlab/show/atomic+site, or [MM92] Chapter III, Section 2, example (f).

Equations
@[protected, instance]
def category_theory.grothendieck_topology.cover {C : Type u} (X : C) :
Type (max u v)

J.cover X denotes the poset of covers of X with respect to the Grothendieck topology J.

Equations
Instances for category_theory.grothendieck_topology.cover
@[protected, instance]
Equations
@[protected, instance]
def category_theory.grothendieck_topology.cover.has_coe_to_fun {C : Type u} {X : C}  :
has_coe_to_fun (J.cover X) (λ (S : J.cover X), Π ⦃Y : C⦄, (Y X) → Prop)
Equations
@[simp]
theorem category_theory.grothendieck_topology.cover.coe_fun_coe {C : Type u} {X Y : C} (S : J.cover X) (f : Y X) :
S f = S f
theorem category_theory.grothendieck_topology.cover.condition {C : Type u} {X : C} (S : J.cover X) :
S J X
@[ext]
theorem category_theory.grothendieck_topology.cover.ext {C : Type u} {X : C} (S T : J.cover X) (h : ∀ ⦃Y : C⦄ (f : Y X), S f T f) :
S = T
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
theorem category_theory.grothendieck_topology.cover.arrow.ext_iff {C : Type u} {_inst_1 : category_theory.category C} {X : C} {S : J.cover X} (x y : S.arrow) :
x = y x.Y = y.Y x.f == y.f
theorem category_theory.grothendieck_topology.cover.arrow.ext {C : Type u} {_inst_1 : category_theory.category C} {X : C} {S : J.cover X} (x y : S.arrow) (h : x.Y = y.Y) (h_1 : x.f == y.f) :
x = y
@[nolint, ext]
structure category_theory.grothendieck_topology.cover.arrow {C : Type u} {X : C} (S : J.cover X) :
Type (max u v)
• Y : C
• f : self.Y X
• hf : S self.f

An auxiliary structure, used to define S.index in plus.lean.

Instances for category_theory.grothendieck_topology.cover.arrow
• category_theory.grothendieck_topology.cover.arrow.has_sizeof_inst
theorem category_theory.grothendieck_topology.cover.relation.ext_iff {C : Type u} {_inst_1 : category_theory.category C} {X : C} {S : J.cover X} (x y : S.relation) :
x = y x.Y₁ = y.Y₁ x.Y₂ = y.Y₂ x.Z = y.Z x.g₁ == y.g₁ x.g₂ == y.g₂ x.f₁ == y.f₁ x.f₂ == y.f₂
@[nolint, ext]
structure category_theory.grothendieck_topology.cover.relation {C : Type u} {X : C} (S : J.cover X) :
Type (max u v)

An auxiliary structure, used to define S.index in plus.lean.

Instances for category_theory.grothendieck_topology.cover.relation
• category_theory.grothendieck_topology.cover.relation.has_sizeof_inst
theorem category_theory.grothendieck_topology.cover.relation.ext {C : Type u} {_inst_1 : category_theory.category C} {X : C} {S : J.cover X} (x y : S.relation) (h : x.Y₁ = y.Y₁) (h_1 : x.Y₂ = y.Y₂) (h_2 : x.Z = y.Z) (h_3 : x.g₁ == y.g₁) (h_4 : x.g₂ == y.g₂) (h_5 : x.f₁ == y.f₁) (h_6 : x.f₂ == y.f₂) :
x = y
@[simp]
theorem category_theory.grothendieck_topology.cover.arrow.map_f {C : Type u} {X : C} {S T : J.cover X} (I : S.arrow) (f : S T) :
(I.map f).f = I.f
def category_theory.grothendieck_topology.cover.arrow.map {C : Type u} {X : C} {S T : J.cover X} (I : S.arrow) (f : S T) :

Map a arrow along a refinement S ⟶ T.

Equations
@[simp]
theorem category_theory.grothendieck_topology.cover.arrow.map_Y {C : Type u} {X : C} {S T : J.cover X} (I : S.arrow) (f : S T) :
(I.map f).Y = I.Y
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.map_Y₂ {C : Type u} {X : C} {S T : J.cover X} (I : S.relation) (f : S T) :
(I.map f).Y₂ = I.Y₂
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.map_g₂ {C : Type u} {X : C} {S T : J.cover X} (I : S.relation) (f : S T) :
(I.map f).g₂ = I.g₂
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.map_f₂ {C : Type u} {X : C} {S T : J.cover X} (I : S.relation) (f : S T) :
(I.map f).f₂ = I.f₂
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.map_Y₁ {C : Type u} {X : C} {S T : J.cover X} (I : S.relation) (f : S T) :
(I.map f).Y₁ = I.Y₁
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.map_g₁ {C : Type u} {X : C} {S T : J.cover X} (I : S.relation) (f : S T) :
(I.map f).g₁ = I.g₁
def category_theory.grothendieck_topology.cover.relation.map {C : Type u} {X : C} {S T : J.cover X} (I : S.relation) (f : S T) :

Map a relation along a refinement S ⟶ T.

Equations
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.map_Z {C : Type u} {X : C} {S T : J.cover X} (I : S.relation) (f : S T) :
(I.map f).Z = I.Z
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.map_f₁ {C : Type u} {X : C} {S T : J.cover X} (I : S.relation) (f : S T) :
(I.map f).f₁ = I.f₁
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.fst_f {C : Type u} {X : C} {S : J.cover X} (I : S.relation) :
I.fst.f = I.f₁
def category_theory.grothendieck_topology.cover.relation.fst {C : Type u} {X : C} {S : J.cover X} (I : S.relation) :

The first arrow associated to a relation. Used in defining index in plus.lean.

Equations
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.fst_Y {C : Type u} {X : C} {S : J.cover X} (I : S.relation) :
I.fst.Y = I.Y₁
def category_theory.grothendieck_topology.cover.relation.snd {C : Type u} {X : C} {S : J.cover X} (I : S.relation) :

The second arrow associated to a relation. Used in defining index in plus.lean.

Equations
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.snd_Y {C : Type u} {X : C} {S : J.cover X} (I : S.relation) :
I.snd.Y = I.Y₂
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.snd_f {C : Type u} {X : C} {S : J.cover X} (I : S.relation) :
I.snd.f = I.f₂
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.map_fst {C : Type u} {X : C} {S T : J.cover X} (I : S.relation) (f : S T) :
I.fst.map f = (I.map f).fst
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.map_snd {C : Type u} {X : C} {S T : J.cover X} (I : S.relation) (f : S T) :
I.snd.map f = (I.map f).snd
def category_theory.grothendieck_topology.cover.pullback {C : Type u} {X Y : C} (S : J.cover X) (f : Y X) :
J.cover Y

Pull back a cover along a morphism.

Equations
@[simp]
theorem category_theory.grothendieck_topology.cover.arrow.base_Y {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).arrow) :
I.base.Y = I.Y
@[simp]
theorem category_theory.grothendieck_topology.cover.arrow.base_f {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).arrow) :
I.base.f = I.f f
def category_theory.grothendieck_topology.cover.arrow.base {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).arrow) :

An arrow of S.pullback f gives rise to an arrow of S.

Equations
def category_theory.grothendieck_topology.cover.relation.base {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).relation) :

A relation of S.pullback f gives rise to a relation of S.

Equations
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.base_Z {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).relation) :
I.base.Z = I.Z
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.base_f₂ {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).relation) :
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.base_Y₁ {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).relation) :
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.base_g₁ {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).relation) :
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.base_g₂ {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).relation) :
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.base_f₁ {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).relation) :
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.base_Y₂ {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).relation) :
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.base_fst {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).relation) :
@[simp]
theorem category_theory.grothendieck_topology.cover.relation.base_snd {C : Type u} {X Y : C} {f : Y X} {S : J.cover X} (I : (S.pullback f).relation) :
@[simp]
theorem category_theory.grothendieck_topology.cover.coe_pullback {C : Type u} {X Y : C} {Z : C} (f : Y X) (g : Z Y) (S : J.cover X) :
(S.pullback f) g S (g f)
def category_theory.grothendieck_topology.cover.pullback_id {C : Type u} {X : C} (S : J.cover X) :
S.pullback (𝟙 X) S

The isomorphism between S and the pullback of S w.r.t. the identity.

Equations
def category_theory.grothendieck_topology.cover.pullback_comp {C : Type u} {X Y Z : C} (S : J.cover X) (f : Z Y) (g : Y X) :
S.pullback (f g) (S.pullback g).pullback f

Pulling back with respect to a composition is the composition of the pullbacks.

Equations
def category_theory.grothendieck_topology.cover.bind {C : Type u} {X : C} (S : J.cover X) (T : Π (I : S.arrow), J.cover I.Y) :
J.cover X

Combine a family of covers over a cover.

Equations
def category_theory.grothendieck_topology.cover.bind_to_base {C : Type u} {X : C} (S : J.cover X) (T : Π (I : S.arrow), J.cover I.Y) :
S.bind T S

The canonical moprhism from S.bind T to T.

Equations
noncomputable def category_theory.grothendieck_topology.cover.arrow.middle {C : Type u} {X : C} {S : J.cover X} {T : Π (I : S.arrow), J.cover I.Y} (I : (S.bind T).arrow) :
C

An arrow in bind has the form A ⟶ B ⟶ X where A ⟶ B is an arrow in T I for some I. and B ⟶ X is an arrow of S. This is the object B.

Equations
noncomputable def category_theory.grothendieck_topology.cover.arrow.to_middle_hom {C : Type u} {X : C} {S : J.cover X} {T : Π (I : S.arrow), J.cover I.Y} (I : (S.bind T).arrow) :

An arrow in bind has the form A ⟶ B ⟶ X where A ⟶ B is an arrow in T I for some I. and B ⟶ X is an arrow of S. This is the hom A ⟶ B.

Equations
noncomputable def category_theory.grothendieck_topology.cover.arrow.from_middle_hom {C : Type u} {X : C} {S : J.cover X} {T : Π (I : S.arrow), J.cover I.Y} (I : (S.bind T).arrow) :

An arrow in bind has the form A ⟶ B ⟶ X where A ⟶ B is an arrow in T I for some I. and B ⟶ X is an arrow of S. This is the hom B ⟶ X.

Equations
theorem category_theory.grothendieck_topology.cover.arrow.from_middle_condition {C : Type u} {X : C} {S : J.cover X} {T : Π (I : S.arrow), J.cover I.Y} (I : (S.bind T).arrow) :
noncomputable def category_theory.grothendieck_topology.cover.arrow.from_middle {C : Type u} {X : C} {S : J.cover X} {T : Π (I : S.arrow), J.cover I.Y} (I : (S.bind T).arrow) :

An arrow in bind has the form A ⟶ B ⟶ X where A ⟶ B is an arrow in T I for some I. and B ⟶ X is an arrow of S. This is the hom B ⟶ X, as an arrow.

Equations
theorem category_theory.grothendieck_topology.cover.arrow.to_middle_condition {C : Type u} {X : C} {S : J.cover X} {T : Π (I : S.arrow), J.cover I.Y} (I : (S.bind T).arrow) :
noncomputable def category_theory.grothendieck_topology.cover.arrow.to_middle {C : Type u} {X : C} {S : J.cover X} {T : Π (I : S.arrow), J.cover I.Y} (I : (S.bind T).arrow) :

An arrow in bind has the form A ⟶ B ⟶ X where A ⟶ B is an arrow in T I for some I. and B ⟶ X is an arrow of S. This is the hom A ⟶ B, as an arrow.

Equations
theorem category_theory.grothendieck_topology.cover.arrow.middle_spec {C : Type u} {X : C} {S : J.cover X} {T : Π (I : S.arrow), J.cover I.Y} (I : (S.bind T).arrow) :
= I.f
def category_theory.grothendieck_topology.cover.index {C : Type u} {X : C} {D : Type w} (S : J.cover X) (P : Cᵒᵖ D) :

To every S : J.cover X and presheaf P, associate a multicospan_index.

Equations
@[reducible]
def category_theory.grothendieck_topology.cover.multifork {C : Type u} {X : C} {D : Type w} (S : J.cover X) (P : Cᵒᵖ D) :

The natural multifork associated to S : J.cover X for a presheaf P. Saying that this multifork is a limit is essentially equivalent to the sheaf condition at the given object for the given covering sieve. See sheaf.lean for an equivalent sheaf condition using this.

@[reducible]
noncomputable def category_theory.grothendieck_topology.cover.to_multiequalizer {C : Type u} {X : C} {D : Type w} (S : J.cover X) (P : Cᵒᵖ D)  :

The canonical map from P.obj (op X) to the multiequalizer associated to a covering sieve, assuming such a multiequalizer exists. This will be used in sheaf.lean to provide an equivalent sheaf condition in terms of multiequalizers.

@[simp]
theorem category_theory.grothendieck_topology.pullback_obj {C : Type u} {X Y : C} (f : Y X) (S : J.cover X) :
(J.pullback f).obj S = S.pullback f
def category_theory.grothendieck_topology.pullback {C : Type u} {X Y : C} (f : Y X) :
J.cover X J.cover Y

Pull back a cover along a morphism.

Equations

Pulling back along the identity is naturally isomorphic to the identity functor.

Equations
def category_theory.grothendieck_topology.pullback_comp {C : Type u} {X Y Z : C} (f : X Y) (g : Y Z) :

Pulling back along a composition is naturally isomorphic to the composition of the pullbacks.

Equations