File: Mathlib/CategoryTheory/Sites/Canonical.lean

full_name: CategoryTheory.Sheaf.isSheafFor_bind
code: /--
To show `P` is a sheaf for the binding of `U` with `B`, it suffices to show that `P` is a sheaf for
`U`, that `P` is a sheaf for each sieve in `B`, and that it is separated for any pullback of any
sieve in `B`.

This is mostly an auxiliary lemma to show `isSheafFor_trans`.
Adapted from [Elephant], Lemma C2.1.7(i) with suggestions as mentioned in
https://math.stackexchange.com/a/358709/
-/
theorem isSheafFor_bind (P : Cᵒᵖ ⥤ Type v) (U : Sieve X) (B : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, U f → Sieve Y)
    (hU : Presieve.IsSheafFor P (U : Presieve X))
    (hB : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (hf : U f), Presieve.IsSheafFor P (B hf : Presieve Y))
    (hB' : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (h : U f) ⦃Z⦄ (g : Z ⟶ Y),
      Presieve.IsSeparatedFor P (((B h).pullback g) : Presieve Z)) :
    Presieve.IsSheafFor P (Sieve.bind (U : Presieve X) B : Presieve X) 
goal: CategoryTheory.Presieve.IsSheafFor P (CategoryTheory.Sieve.bind U.arrows B).arrows

full_name: CategoryTheory.Sheaf.isSheafFor_trans
code: /-- Given two sieves `R` and `S`, to show that `P` is a sheaf for `S`, we can show:
* `P` is a sheaf for `R`
* `P` is a sheaf for the pullback of `S` along any arrow in `R`
* `P` is separated for the pullback of `R` along any arrow in `S`.

This is mostly an auxiliary lemma to construct `finestTopology`.
Adapted from [Elephant], Lemma C2.1.7(ii) with suggestions as mentioned in
https://math.stackexchange.com/a/358709
-/
theorem isSheafFor_trans (P : Cᵒᵖ ⥤ Type v) (R S : Sieve X)
    (hR : Presieve.IsSheafFor P (R : Presieve X))
    (hR' : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (_ : S f), Presieve.IsSeparatedFor P (R.pullback f : Presieve Y))
    (hS : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (_ : R f), Presieve.IsSheafFor P (S.pullback f : Presieve Y)) :
    Presieve.IsSheafFor P (S : Presieve X) 
goal: CategoryTheory.Presieve.IsSheafFor P S.arrows

full_name: CategoryTheory.Sheaf.finestTopologySingle
code: /-- Construct the finest (largest) Grothendieck topology for which the given presheaf is a sheaf.

This is a special case of https://stacks.math.columbia.edu/tag/00Z9, but following a different
proof (see the comments there).
-/
def finestTopologySingle (P : Cᵒᵖ ⥤ Type v) : GrothendieckTopology C 
goal: CategoryTheory.GrothendieckTopology C

full_name: CategoryTheory.Sheaf.finestTopology
code: /--
Construct the finest (largest) Grothendieck topology for which all the given presheaves are sheaves.

This is equal to the construction of <https://stacks.math.columbia.edu/tag/00Z9>.
-/
def finestTopology (Ps : Set (Cᵒᵖ ⥤ Type v)) : GrothendieckTopology C 
goal: CategoryTheory.GrothendieckTopology C

full_name: CategoryTheory.Sheaf.sheaf_for_finestTopology
code: /-- Check that if `P ∈ Ps`, then `P` is indeed a sheaf for the finest topology on `Ps`. -/
theorem sheaf_for_finestTopology (Ps : Set (Cᵒᵖ ⥤ Type v)) (h : P ∈ Ps) :
    Presieve.IsSheaf (finestTopology Ps) P 
goal: CategoryTheory.Presieve.IsSheaf (CategoryTheory.Sheaf.finestTopology Ps) P

full_name: CategoryTheory.Sheaf.le_finestTopology
code: /--
Check that if each `P ∈ Ps` is a sheaf for `J`, then `J` is a subtopology of `finestTopology Ps`.
-/
theorem le_finestTopology (Ps : Set (Cᵒᵖ ⥤ Type v)) (J : GrothendieckTopology C)
    (hJ : ∀ P ∈ Ps, Presieve.IsSheaf J P) : J ≤ finestTopology Ps 
goal: J ≤ CategoryTheory.Sheaf.finestTopology Ps

full_name: CategoryTheory.Sheaf.canonicalTopology
code: /-- The `canonicalTopology` on a category is the finest (largest) topology for which every
representable presheaf is a sheaf.

See <https://stacks.math.columbia.edu/tag/00ZA>
-/
def canonicalTopology (C : Type u) [Category.{v} C] : GrothendieckTopology C 
goal: CategoryTheory.GrothendieckTopology C

full_name: CategoryTheory.Sheaf.isSheaf_yoneda_obj
code: /-- `yoneda.obj X` is a sheaf for the canonical topology. -/
theorem isSheaf_yoneda_obj (X : C) : Presieve.IsSheaf (canonicalTopology C) (yoneda.obj X) 
goal: CategoryTheory.Presieve.IsSheaf (CategoryTheory.Sheaf.canonicalTopology C) (CategoryTheory.yoneda.obj X)

full_name: CategoryTheory.Sheaf.isSheaf_of_representable
code: /-- A representable functor is a sheaf for the canonical topology. -/
theorem isSheaf_of_representable (P : Cᵒᵖ ⥤ Type v) [P.Representable] :
    Presieve.IsSheaf (canonicalTopology C) P 
goal: CategoryTheory.Presieve.IsSheaf (CategoryTheory.Sheaf.canonicalTopology C) P

full_name: CategoryTheory.Sheaf.Subcanonical
code: /-- A subcanonical topology is a topology which is smaller than the canonical topology.
Equivalently, a topology is subcanonical iff every representable is a sheaf.
-/
def Subcanonical (J : GrothendieckTopology C) : Prop 
goal: Prop

full_name: CategoryTheory.Sheaf.Subcanonical.of_yoneda_isSheaf
code: /-- If every functor `yoneda.obj X` is a `J`-sheaf, then `J` is subcanonical. -/
theorem of_yoneda_isSheaf (J : GrothendieckTopology C)
    (h : ∀ X, Presieve.IsSheaf J (yoneda.obj X)) : Subcanonical J 
goal: CategoryTheory.Sheaf.Subcanonical J

full_name: CategoryTheory.Sheaf.Subcanonical.isSheaf_of_representable
code: /-- If `J` is subcanonical, then any representable is a `J`-sheaf. -/
theorem isSheaf_of_representable {J : GrothendieckTopology C} (hJ : Subcanonical J)
    (P : Cᵒᵖ ⥤ Type v) [P.Representable] : Presieve.IsSheaf J P 
goal: CategoryTheory.Presieve.IsSheaf J P

full_name: CategoryTheory.Sheaf.Subcanonical.yoneda_map_val
code: /--
If `J` is subcanonical, we obtain a "Yoneda" functor from the defining site
into the sheaf category.
-/
@[simps]
def yoneda (hJ : Subcanonical J) : C ⥤ Sheaf J (Type v) 
goal: ∀ {X Y : C} (f : X ⟶ Y), (hJ.yoneda.map f).val = CategoryTheory.yoneda.map f

full_name: CategoryTheory.Sheaf.Subcanonical.yoneda
code: /--
If `J` is subcanonical, we obtain a "Yoneda" functor from the defining site
into the sheaf category.
-/
@[simps]
def yoneda (hJ : Subcanonical J) : C ⥤ Sheaf J (Type v) 
goal: CategoryTheory.Functor C (CategoryTheory.Sheaf J (Type v))

full_name: CategoryTheory.Sheaf.Subcanonical.yoneda_obj_val
code: /--
If `J` is subcanonical, we obtain a "Yoneda" functor from the defining site
into the sheaf category.
-/
@[simps]
def yoneda (hJ : Subcanonical J) : C ⥤ Sheaf J (Type v) 
goal: (hJ.yoneda.obj X).val = CategoryTheory.yoneda.obj X

full_name: CategoryTheory.Sheaf.Subcanonical.yonedaCompSheafToPresheaf
code: /--
The yoneda embedding into the presheaf category factors through the one
to the sheaf category.
-/
def yonedaCompSheafToPresheaf :
    hJ.yoneda ⋙ sheafToPresheaf J (Type v) ≅ CategoryTheory.yoneda 
goal: hJ.yoneda.comp (CategoryTheory.sheafToPresheaf J (Type v)) ≅ CategoryTheory.yoneda

full_name: CategoryTheory.Sheaf.Subcanonical.yonedaFullyFaithful
code: /-- The yoneda functor into the sheaf category is fully faithful -/
def yonedaFullyFaithful : hJ.yoneda.FullyFaithful 
goal: hJ.yoneda.FullyFaithful

full_name: CategoryTheory.Sheaf.Subcanonical.instFullTypeYoneda
code: instance : hJ.yoneda.Full 
goal: hJ.yoneda.Full

full_name: CategoryTheory.Sheaf.Subcanonical.instFaithfulTypeYoneda
code: instance : hJ.yoneda.Faithful 
goal: hJ.yoneda.Faithful