File: Mathlib/CategoryTheory/Sites/SheafOfTypes.lean

full_name: CategoryTheory.Presieve.IsSeparated
code: /-- A presheaf is separated for a topology if it is separated for every sieve in the topology. -/
def IsSeparated (P : Cᵒᵖ ⥤ Type w) : Prop 
goal: Prop

full_name: CategoryTheory.Presieve.IsSheaf
code: /-- A presheaf is a sheaf for a topology if it is a sheaf for every sieve in the topology.

If the given topology is given by a pretopology, `isSheaf_pretopology` shows it suffices to
check the sheaf condition at presieves in the pretopology.
-/
def IsSheaf (P : Cᵒᵖ ⥤ Type w) : Prop 
goal: Prop

full_name: CategoryTheory.Presieve.IsSheaf.isSheafFor
code: theorem IsSheaf.isSheafFor {P : Cᵒᵖ ⥤ Type w} (hp : IsSheaf J P) (R : Presieve X)
    (hr : generate R ∈ J X) : IsSheafFor P R 
goal: CategoryTheory.Presieve.IsSheafFor P R

full_name: CategoryTheory.Presieve.isSheaf_of_le
code: theorem isSheaf_of_le (P : Cᵒᵖ ⥤ Type w) {J₁ J₂ : GrothendieckTopology C} :
    J₁ ≤ J₂ → IsSheaf J₂ P → IsSheaf J₁ P 
goal: J₁ ≤ J₂ → CategoryTheory.Presieve.IsSheaf J₂ P → CategoryTheory.Presieve.IsSheaf J₁ P

full_name: CategoryTheory.Presieve.isSeparated_of_isSheaf
code: theorem isSeparated_of_isSheaf (P : Cᵒᵖ ⥤ Type w) (h : IsSheaf J P) : IsSeparated J P 
goal: CategoryTheory.Presieve.IsSeparated J P

full_name: CategoryTheory.Presieve.isSheaf_iso
code: /-- The property of being a sheaf is preserved by isomorphism. -/
theorem isSheaf_iso {P' : Cᵒᵖ ⥤ Type w} (i : P ≅ P') (h : IsSheaf J P) : IsSheaf J P' 
goal: CategoryTheory.Presieve.IsSheaf J P'

full_name: CategoryTheory.Presieve.isSheaf_of_yoneda
code: theorem isSheaf_of_yoneda {P : Cᵒᵖ ⥤ Type v}
    (h : ∀ {X} (S : Sieve X), S ∈ J X → YonedaSheafCondition P S) : IsSheaf J P 
goal: CategoryTheory.Presieve.IsSheaf J P

full_name: CategoryTheory.Presieve.isSheaf_pretopology
code: /-- For a topology generated by a basis, it suffices to check the sheaf condition on the basis
presieves only.
-/
theorem isSheaf_pretopology [HasPullbacks C] (K : Pretopology C) :
    IsSheaf (K.toGrothendieck C) P ↔ ∀ {X : C} (R : Presieve X), R ∈ K X → IsSheafFor P R 
goal: CategoryTheory.Presieve.IsSheaf (CategoryTheory.Pretopology.toGrothendieck C K) P ↔
  ∀ {X : C}, ∀ R ∈ K.coverings X, CategoryTheory.Presieve.IsSheafFor P R

full_name: CategoryTheory.Presieve.isSheaf_bot
code: /-- Any presheaf is a sheaf for the bottom (trivial) grothendieck topology. -/
theorem isSheaf_bot : IsSheaf (⊥ : GrothendieckTopology C) P 
goal: CategoryTheory.Presieve.IsSheaf ⊥ P

full_name: CategoryTheory.Presieve.compatibleYonedaFamily_toCocone
code: /--
For a presheaf of the form `yoneda.obj W`, a compatible family of elements on a sieve
is the same as a co-cone over the sieve. Constructing a co-cone from a compatible family works for
any presieve, as does constructing a family of elements from a co-cone. Showing compatibility of the
family needs the sieve condition.
Note: This is related to `CategoryTheory.Presheaf.conesEquivSieveCompatibleFamily`
 -/

def compatibleYonedaFamily_toCocone (R : Presieve X) (W : C) (x : FamilyOfElements (yoneda.obj W) R)
    (hx : FamilyOfElements.Compatible x) :
    Cocone (R.diagram) 
goal: CategoryTheory.Limits.Cocone R.diagram

full_name: CategoryTheory.Presieve.yonedaFamilyOfElements_fromCocone
code: def yonedaFamilyOfElements_fromCocone (R : Presieve X) (s : Cocone (diagram R)) :
    FamilyOfElements (yoneda.obj s.pt) R 
goal: CategoryTheory.Presieve.FamilyOfElements (CategoryTheory.yoneda.obj s.pt) R

full_name: CategoryTheory.Sieve.yonedaFamily_fromCocone_compatible
code: theorem yonedaFamily_fromCocone_compatible (S : Sieve X) (s : Cocone (diagram S.arrows)) :
    FamilyOfElements.Compatible <| yonedaFamilyOfElements_fromCocone S.arrows s 
goal: (S.arrows.yonedaFamilyOfElements_fromCocone s).Compatible

full_name: CategoryTheory.Sieve.forallYonedaIsSheaf_iff_colimit
code: /--
The base of a sieve `S` is a colimit of `S` iff all Yoneda-presheaves satisfy
the sheaf condition for `S`.
-/
theorem forallYonedaIsSheaf_iff_colimit (S : Sieve X) :
    (∀ W : C, Presieve.IsSheafFor (yoneda.obj W) (S : Presieve X)) ↔
      Nonempty (IsColimit S.arrows.cocone) 
goal: (∀ (W : C), CategoryTheory.Presieve.IsSheafFor (CategoryTheory.yoneda.obj W) S.arrows) ↔
  Nonempty (CategoryTheory.Limits.IsColimit S.arrows.cocone)

full_name: CategoryTheory.SheafOfTypes.val
code: /-- The category of sheaves on a grothendieck topology. -/
structure SheafOfTypes (J : GrothendieckTopology C) : Type max u v (w + 1) where
  /-- the underlying presheaf -/
  val : Cᵒᵖ ⥤ Type w
  /-- the condition that the presheaf is a sheaf -/
  cond : Presieve.IsSheaf J val
goal: CategoryTheory.Functor Cᵒᵖ (Type w)

full_name: CategoryTheory.SheafOfTypes.cond
code: /-- The category of sheaves on a grothendieck topology. -/
structure SheafOfTypes (J : GrothendieckTopology C) : Type max u v (w + 1) where
  /-- the underlying presheaf -/
  val : Cᵒᵖ ⥤ Type w
  /-- the condition that the presheaf is a sheaf -/
  cond : Presieve.IsSheaf J val
goal: CategoryTheory.Presieve.IsSheaf J self.val

full_name: CategoryTheory.SheafOfTypes
code: /-- The category of sheaves on a grothendieck topology. -/
structure SheafOfTypes (J : GrothendieckTopology C) : Type max u v (w + 1) where
  /-- the underlying presheaf -/
  val : Cᵒᵖ ⥤ Type w
  /-- the condition that the presheaf is a sheaf -/
  cond : Presieve.IsSheaf J val
goal: Type (max u v (w + 1))

full_name: CategoryTheory.SheafOfTypes.Hom
code: /-- Morphisms between sheaves of types are just morphisms between the underlying presheaves. -/
@[ext]
structure Hom (X Y : SheafOfTypes J) where
  /-- a morphism between the underlying presheaves -/
  val : X.val ⟶ Y.val
goal: Type (max u u_1)

full_name: CategoryTheory.SheafOfTypes.Hom.val
code: /-- Morphisms between sheaves of types are just morphisms between the underlying presheaves. -/
@[ext]
structure Hom (X Y : SheafOfTypes J) where
  /-- a morphism between the underlying presheaves -/
  val : X.val ⟶ Y.val
goal: X.val ⟶ Y.val

full_name: CategoryTheory.SheafOfTypes.instCategory
code: @[simps]
instance : Category (SheafOfTypes J) 
goal: CategoryTheory.Category.{max u u_1, max (max u v) (u_1 + 1)} (CategoryTheory.SheafOfTypes J)

full_name: CategoryTheory.SheafOfTypes.instCategory_comp_val
code: @[simps]
instance : Category (SheafOfTypes J) 
goal: ∀ {X Y Z : CategoryTheory.SheafOfTypes J} (f : X ⟶ Y) (g : Y ⟶ Z),
  (CategoryTheory.CategoryStruct.comp f g).val = CategoryTheory.CategoryStruct.comp f.val g.val

full_name: CategoryTheory.SheafOfTypes.instCategory_id_val
code: @[simps]
instance : Category (SheafOfTypes J) 
goal: ∀ (x : CategoryTheory.SheafOfTypes J), (CategoryTheory.CategoryStruct.id x).val = CategoryTheory.CategoryStruct.id x.val

full_name: CategoryTheory.SheafOfTypes.Hom.ext'
code: @[ext]
theorem Hom.ext' {X Y : SheafOfTypes J} (f g : X ⟶ Y) (w : f.val = g.val) : f = g 
goal: f = g

full_name: CategoryTheory.SheafOfTypes.instInhabitedHom
code: instance (X : SheafOfTypes J) : Inhabited (Hom X X) 
goal: Inhabited (X.Hom X)

full_name: CategoryTheory.sheafOfTypesToPresheaf
code: /-- The inclusion functor from sheaves to presheaves. -/
@[simps]
def sheafOfTypesToPresheaf : SheafOfTypes J ⥤ Cᵒᵖ ⥤ Type w 
goal: CategoryTheory.Functor (CategoryTheory.SheafOfTypes J) (CategoryTheory.Functor Cᵒᵖ (Type w))

full_name: CategoryTheory.sheafOfTypesToPresheaf_obj
code: /-- The inclusion functor from sheaves to presheaves. -/
@[simps]
def sheafOfTypesToPresheaf : SheafOfTypes J ⥤ Cᵒᵖ ⥤ Type w 
goal: (CategoryTheory.sheafOfTypesToPresheaf J).obj self = self.val

full_name: CategoryTheory.sheafOfTypesToPresheaf_map
code: /-- The inclusion functor from sheaves to presheaves. -/
@[simps]
def sheafOfTypesToPresheaf : SheafOfTypes J ⥤ Cᵒᵖ ⥤ Type w 
goal: ∀ {X Y : CategoryTheory.SheafOfTypes J} (f : X ⟶ Y), (CategoryTheory.sheafOfTypesToPresheaf J).map f = f.val

full_name: CategoryTheory.instFullSheafOfTypesFunctorOppositeTypeSheafOfTypesToPresheaf
code: instance : (sheafOfTypesToPresheaf J).Full 
goal: (CategoryTheory.sheafOfTypesToPresheaf J).Full

full_name: CategoryTheory.instFaithfulSheafOfTypesFunctorOppositeTypeSheafOfTypesToPresheaf
code: instance : (sheafOfTypesToPresheaf J).Faithful 
goal: (CategoryTheory.sheafOfTypesToPresheaf J).Faithful

full_name: CategoryTheory.sheafOfTypesBotEquiv
code: /--
The category of sheaves on the bottom (trivial) grothendieck topology is equivalent to the category
of presheaves.
-/
@[simps]
def sheafOfTypesBotEquiv : SheafOfTypes (⊥ : GrothendieckTopology C) ≌ Cᵒᵖ ⥤ Type w 
goal: CategoryTheory.SheafOfTypes ⊥ ≌ CategoryTheory.Functor Cᵒᵖ (Type w)

full_name: CategoryTheory.sheafOfTypesBotEquiv_functor
code: /--
The category of sheaves on the bottom (trivial) grothendieck topology is equivalent to the category
of presheaves.
-/
@[simps]
def sheafOfTypesBotEquiv : SheafOfTypes (⊥ : GrothendieckTopology C) ≌ Cᵒᵖ ⥤ Type w 
goal: CategoryTheory.sheafOfTypesBotEquiv.functor = CategoryTheory.sheafOfTypesToPresheaf ⊥

full_name: CategoryTheory.sheafOfTypesBotEquiv_inverse_map_val
code: /--
The category of sheaves on the bottom (trivial) grothendieck topology is equivalent to the category
of presheaves.
-/
@[simps]
def sheafOfTypesBotEquiv : SheafOfTypes (⊥ : GrothendieckTopology C) ≌ Cᵒᵖ ⥤ Type w 
goal: ∀ {X Y : CategoryTheory.Functor Cᵒᵖ (Type w)} (f : X ⟶ Y), (CategoryTheory.sheafOfTypesBotEquiv.inverse.map f).val = f

full_name: CategoryTheory.sheafOfTypesBotEquiv_unitIso
code: /--
The category of sheaves on the bottom (trivial) grothendieck topology is equivalent to the category
of presheaves.
-/
@[simps]
def sheafOfTypesBotEquiv : SheafOfTypes (⊥ : GrothendieckTopology C) ≌ Cᵒᵖ ⥤ Type w 
goal: CategoryTheory.sheafOfTypesBotEquiv.unitIso =
  CategoryTheory.Iso.refl (CategoryTheory.Functor.id (CategoryTheory.SheafOfTypes ⊥))

full_name: CategoryTheory.sheafOfTypesBotEquiv_counitIso
code: /--
The category of sheaves on the bottom (trivial) grothendieck topology is equivalent to the category
of presheaves.
-/
@[simps]
def sheafOfTypesBotEquiv : SheafOfTypes (⊥ : GrothendieckTopology C) ≌ Cᵒᵖ ⥤ Type w 
goal: CategoryTheory.sheafOfTypesBotEquiv.counitIso =
  CategoryTheory.Iso.refl
    ({ obj := fun P => { val := P, cond := ⋯ }, map := fun {X Y} f => { val := f }, map_id := ⋯, map_comp := ⋯ }.comp
      (CategoryTheory.sheafOfTypesToPresheaf ⊥))

full_name: CategoryTheory.sheafOfTypesBotEquiv_inverse_obj_val
code: /--
The category of sheaves on the bottom (trivial) grothendieck topology is equivalent to the category
of presheaves.
-/
@[simps]
def sheafOfTypesBotEquiv : SheafOfTypes (⊥ : GrothendieckTopology C) ≌ Cᵒᵖ ⥤ Type w 
goal: (CategoryTheory.sheafOfTypesBotEquiv.inverse.obj P).val = P

full_name: CategoryTheory.instInhabitedSheafOfTypesBotGrothendieckTopology
code: instance : Inhabited (SheafOfTypes (⊥ : GrothendieckTopology C)) 
goal: Inhabited (CategoryTheory.SheafOfTypes ⊥)