File: Mathlib/CategoryTheory/Sites/Sheafification.lean

full_name: CategoryTheory.HasWeakSheafify
code: /--
A proposition saying that the inclusion functor from sheaves to presheaves admits a left adjoint.
-/
abbrev HasWeakSheafify : Prop 
goal: Prop

full_name: CategoryTheory.HasSheafify.isRightAdjoint
code: /--
`HasSheafify` means that the inclusion functor from sheaves to presheaves admits a left exact
left adjiont (sheafification).

Given a finite limit preserving functor `F : (Cᵒᵖ ⥤ A) ⥤ Sheaf J A` and an adjunction
`adj : F ⊣ sheafToPresheaf J A`, use `HasSheafify.mk'` to construct a `HasSheafify` instance.
-/
class HasSheafify : Prop where
  isRightAdjoint : HasWeakSheafify J A
  isLeftExact : Nonempty (PreservesFiniteLimits ((sheafToPresheaf J A).leftAdjoint))
goal: CategoryTheory.HasWeakSheafify J A

full_name: CategoryTheory.HasSheafify
code: /--
`HasSheafify` means that the inclusion functor from sheaves to presheaves admits a left exact
left adjiont (sheafification).

Given a finite limit preserving functor `F : (Cᵒᵖ ⥤ A) ⥤ Sheaf J A` and an adjunction
`adj : F ⊣ sheafToPresheaf J A`, use `HasSheafify.mk'` to construct a `HasSheafify` instance.
-/
class HasSheafify : Prop where
  isRightAdjoint : HasWeakSheafify J A
  isLeftExact : Nonempty (PreservesFiniteLimits ((sheafToPresheaf J A).leftAdjoint))
goal: Prop

full_name: CategoryTheory.HasSheafify.isLeftExact
code: /--
`HasSheafify` means that the inclusion functor from sheaves to presheaves admits a left exact
left adjiont (sheafification).

Given a finite limit preserving functor `F : (Cᵒᵖ ⥤ A) ⥤ Sheaf J A` and an adjunction
`adj : F ⊣ sheafToPresheaf J A`, use `HasSheafify.mk'` to construct a `HasSheafify` instance.
-/
class HasSheafify : Prop where
  isRightAdjoint : HasWeakSheafify J A
  isLeftExact : Nonempty (PreservesFiniteLimits ((sheafToPresheaf J A).leftAdjoint))
goal: Nonempty (CategoryTheory.Limits.PreservesFiniteLimits (CategoryTheory.sheafToPresheaf J A).leftAdjoint)

full_name: CategoryTheory.instHasWeakSheafifyOfHasSheafify
code: instance [HasSheafify J A] : HasWeakSheafify J A 
goal: CategoryTheory.HasWeakSheafify J A

full_name: CategoryTheory.instPreservesFiniteLimitsFunctorOppositeSheafLeftAdjointSheafToPresheaf
code: instance [HasSheafify J A] : PreservesFiniteLimits ((sheafToPresheaf J A).leftAdjoint) 
goal: CategoryTheory.Limits.PreservesFiniteLimits (CategoryTheory.sheafToPresheaf J A).leftAdjoint

full_name: CategoryTheory.HasSheafify.mk'
code: theorem HasSheafify.mk' {F : (Cᵒᵖ ⥤ A) ⥤ Sheaf J A} (adj : F ⊣ sheafToPresheaf J A)
    [PreservesFiniteLimits F] : HasSheafify J A 
goal: CategoryTheory.HasSheafify J A

full_name: CategoryTheory.presheafToSheaf
code: /-- The sheafification functor, left adjoint to the inclusion. -/
def presheafToSheaf [HasWeakSheafify J A] : (Cᵒᵖ ⥤ A) ⥤ Sheaf J A 
goal: CategoryTheory.Functor (CategoryTheory.Functor Cᵒᵖ A) (CategoryTheory.Sheaf J A)

full_name: CategoryTheory.instPreservesFiniteLimitsFunctorOppositeSheafPresheafToSheaf
code: instance [HasSheafify J A] : PreservesFiniteLimits (presheafToSheaf J A) 
goal: CategoryTheory.Limits.PreservesFiniteLimits (CategoryTheory.presheafToSheaf J A)

full_name: CategoryTheory.sheafificationAdjunction
code: /-- The sheafification-inclusion adjunction. -/
def sheafificationAdjunction [HasWeakSheafify J A] :
    presheafToSheaf J A ⊣ sheafToPresheaf J A 
goal: CategoryTheory.presheafToSheaf J A ⊣ CategoryTheory.sheafToPresheaf J A

full_name: CategoryTheory.instIsLeftAdjointFunctorOppositeSheafPresheafToSheaf
code: instance [HasWeakSheafify J A] : (presheafToSheaf J A).IsLeftAdjoint 
goal: (CategoryTheory.presheafToSheaf J A).IsLeftAdjoint

full_name: CategoryTheory.sheafify
code: /-- The sheafification of a presheaf `P`. -/
noncomputable abbrev sheafify (P : Cᵒᵖ ⥤ D) : Cᵒᵖ ⥤ D 
goal: CategoryTheory.Functor Cᵒᵖ D

full_name: CategoryTheory.toSheafify
code: /-- The canonical map from `P` to its sheafification. -/
noncomputable abbrev toSheafify (P : Cᵒᵖ ⥤ D) : P ⟶ sheafify J P 
goal: P ⟶ CategoryTheory.sheafify J P

full_name: CategoryTheory.sheafificationAdjunction_unit_app
code: @[simp]
theorem sheafificationAdjunction_unit_app (P : Cᵒᵖ ⥤ D) :
    (sheafificationAdjunction J D).unit.app P = toSheafify J P 
goal: (CategoryTheory.sheafificationAdjunction J D).unit.app P = CategoryTheory.toSheafify J P

full_name: CategoryTheory.sheafifyMap
code: /-- The canonical map on sheafifications induced by a morphism. -/
noncomputable abbrev sheafifyMap {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) : sheafify J P ⟶ sheafify J Q 
goal: CategoryTheory.sheafify J P ⟶ CategoryTheory.sheafify J Q

full_name: CategoryTheory.sheafifyMap_id
code: @[simp]
theorem sheafifyMap_id (P : Cᵒᵖ ⥤ D) : sheafifyMap J (𝟙 P) = 𝟙 (sheafify J P) 
goal: CategoryTheory.sheafifyMap J (CategoryTheory.CategoryStruct.id P) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.sheafify J P)

full_name: CategoryTheory.sheafifyMap_comp
code: @[simp]
theorem sheafifyMap_comp {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R) :
    sheafifyMap J (η ≫ γ) = sheafifyMap J η ≫ sheafifyMap J γ 
goal: CategoryTheory.sheafifyMap J (CategoryTheory.CategoryStruct.comp η γ) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.sheafifyMap J η) (CategoryTheory.sheafifyMap J γ)

full_name: CategoryTheory.toSheafify_naturality
code: @[reassoc (attr := simp)]
theorem toSheafify_naturality {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) :
    η ≫ toSheafify J _ = toSheafify J _ ≫ sheafifyMap J η 
goal: CategoryTheory.CategoryStruct.comp η (CategoryTheory.toSheafify J Q) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.toSheafify J P) (CategoryTheory.sheafifyMap J η)

full_name: CategoryTheory.sheafification
code: /-- The sheafification of a presheaf `P`, as a functor. -/
noncomputable abbrev sheafification : (Cᵒᵖ ⥤ D) ⥤ Cᵒᵖ ⥤ D 
goal: CategoryTheory.Functor (CategoryTheory.Functor Cᵒᵖ D) (CategoryTheory.Functor Cᵒᵖ D)

full_name: CategoryTheory.sheafification_obj
code: theorem sheafification_obj (P : Cᵒᵖ ⥤ D) : (sheafification J D).obj P = sheafify J P 
goal: (CategoryTheory.sheafification J D).obj P = CategoryTheory.sheafify J P

full_name: CategoryTheory.sheafification_map
code: theorem sheafification_map {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) :
    (sheafification J D).map η = sheafifyMap J η 
goal: (CategoryTheory.sheafification J D).map η = CategoryTheory.sheafifyMap J η

full_name: CategoryTheory.toSheafification
code: /-- The canonical map from `P` to its sheafification, as a natural transformation. -/
noncomputable abbrev toSheafification : 𝟭 _ ⟶ sheafification J D 
goal: CategoryTheory.Functor.id (CategoryTheory.Functor Cᵒᵖ D) ⟶ CategoryTheory.sheafification J D

full_name: CategoryTheory.toSheafification_app
code: theorem toSheafification_app (P : Cᵒᵖ ⥤ D) : (toSheafification J D).app P = toSheafify J P 
goal: (CategoryTheory.toSheafification J D).app P = CategoryTheory.toSheafify J P

full_name: CategoryTheory.isIso_toSheafify
code: theorem isIso_toSheafify {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) : IsIso (toSheafify J P) 
goal: CategoryTheory.IsIso (CategoryTheory.toSheafify J P)

full_name: CategoryTheory.isoSheafify
code: /-- If `P` is a sheaf, then `P` is isomorphic to `sheafify J P`. -/
noncomputable def isoSheafify {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) : P ≅ sheafify J P 
goal: P ≅ CategoryTheory.sheafify J P

full_name: CategoryTheory.isoSheafify_hom
code: @[simp]
theorem isoSheafify_hom {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) :
    (isoSheafify J hP).hom = toSheafify J P 
goal: (CategoryTheory.isoSheafify J hP).hom = CategoryTheory.toSheafify J P

full_name: CategoryTheory.sheafifyLift
code: /-- Given a sheaf `Q` and a morphism `P ⟶ Q`, construct a morphism from `sheafify J P` to `Q`. -/
noncomputable def sheafifyLift {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (hQ : Presheaf.IsSheaf J Q) :
    sheafify J P ⟶ Q 
goal: CategoryTheory.sheafify J P ⟶ Q

full_name: CategoryTheory.sheafificationAdjunction_counit_app_val
code: @[simp]
theorem sheafificationAdjunction_counit_app_val (P : Sheaf J D) :
    ((sheafificationAdjunction J D).counit.app P).val = sheafifyLift J (𝟙 P.val) P.cond 
goal: ((CategoryTheory.sheafificationAdjunction J D).counit.app P).val =
  CategoryTheory.sheafifyLift J (CategoryTheory.CategoryStruct.id P.val) ⋯

full_name: CategoryTheory.toSheafify_sheafifyLift
code: @[reassoc (attr := simp)]
theorem toSheafify_sheafifyLift {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (hQ : Presheaf.IsSheaf J Q) :
    toSheafify J P ≫ sheafifyLift J η hQ = η 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.toSheafify J P) (CategoryTheory.sheafifyLift J η hQ) = η

full_name: CategoryTheory.sheafifyLift_unique
code: theorem sheafifyLift_unique {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (hQ : Presheaf.IsSheaf J Q)
    (γ : sheafify J P ⟶ Q) : toSheafify J P ≫ γ = η → γ = sheafifyLift J η hQ 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.toSheafify J P) γ = η → γ = CategoryTheory.sheafifyLift J η hQ

full_name: CategoryTheory.isoSheafify_inv
code: @[simp]
theorem isoSheafify_inv {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) :
    (isoSheafify J hP).inv = sheafifyLift J (𝟙 _) hP 
goal: (CategoryTheory.isoSheafify J hP).inv = CategoryTheory.sheafifyLift J (CategoryTheory.CategoryStruct.id P) hP

full_name: CategoryTheory.sheafify_hom_ext
code: theorem sheafify_hom_ext {P Q : Cᵒᵖ ⥤ D} (η γ : sheafify J P ⟶ Q) (hQ : Presheaf.IsSheaf J Q)
    (h : toSheafify J P ≫ η = toSheafify J P ≫ γ) : η = γ 
goal: η = γ

full_name: CategoryTheory.sheafifyMap_sheafifyLift
code: @[reassoc (attr := simp)]
theorem sheafifyMap_sheafifyLift {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R)
    (hR : Presheaf.IsSheaf J R) :
    sheafifyMap J η ≫ sheafifyLift J γ hR = sheafifyLift J (η ≫ γ) hR 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.sheafifyMap J η) (CategoryTheory.sheafifyLift J γ hR) =
  CategoryTheory.sheafifyLift J (CategoryTheory.CategoryStruct.comp η γ) hR

full_name: CategoryTheory.sheafificationIso_hom_val
code: /-- A sheaf `P` is isomorphic to its own sheafification. -/
@[simps]
noncomputable def sheafificationIso (P : Sheaf J D) : P ≅ (presheafToSheaf J D).obj P.val 
goal: (CategoryTheory.sheafificationIso P).hom.val = (CategoryTheory.isoSheafify J ⋯).hom

full_name: CategoryTheory.sheafificationIso_inv_val
code: /-- A sheaf `P` is isomorphic to its own sheafification. -/
@[simps]
noncomputable def sheafificationIso (P : Sheaf J D) : P ≅ (presheafToSheaf J D).obj P.val 
goal: (CategoryTheory.sheafificationIso P).inv.val = (CategoryTheory.isoSheafify J ⋯).inv

full_name: CategoryTheory.sheafificationIso
code: /-- A sheaf `P` is isomorphic to its own sheafification. -/
@[simps]
noncomputable def sheafificationIso (P : Sheaf J D) : P ≅ (presheafToSheaf J D).obj P.val 
goal: P ≅ (CategoryTheory.presheafToSheaf J D).obj P.val

full_name: CategoryTheory.isIso_sheafificationAdjunction_counit
code: instance isIso_sheafificationAdjunction_counit (P : Sheaf J D) :
    IsIso ((sheafificationAdjunction J D).counit.app P) 
goal: CategoryTheory.IsIso ((CategoryTheory.sheafificationAdjunction J D).counit.app P)

full_name: CategoryTheory.sheafification_reflective
code: instance sheafification_reflective : IsIso (sheafificationAdjunction J D).counit 
goal: CategoryTheory.IsIso (CategoryTheory.sheafificationAdjunction J D).counit

full_name: CategoryTheory.sheafificationNatIso_hom_app_val
code: /-- The natural isomorphism `𝟭 (Sheaf J D) ≅ sheafToPresheaf J D ⋙ presheafToSheaf J D`. -/
@[simps!]
noncomputable def sheafificationNatIso :
    𝟭 (Sheaf J D) ≅ sheafToPresheaf J D ⋙ presheafToSheaf J D 
goal: ((CategoryTheory.sheafificationNatIso J D).hom.app X).val = CategoryTheory.toSheafify J X.val

full_name: CategoryTheory.sheafificationNatIso_inv_app_val
code: /-- The natural isomorphism `𝟭 (Sheaf J D) ≅ sheafToPresheaf J D ⋙ presheafToSheaf J D`. -/
@[simps!]
noncomputable def sheafificationNatIso :
    𝟭 (Sheaf J D) ≅ sheafToPresheaf J D ⋙ presheafToSheaf J D 
goal: ((CategoryTheory.sheafificationNatIso J D).inv.app X).val =
  CategoryTheory.sheafifyLift J (CategoryTheory.CategoryStruct.id X.val) ⋯

full_name: CategoryTheory.sheafificationNatIso
code: /-- The natural isomorphism `𝟭 (Sheaf J D) ≅ sheafToPresheaf J D ⋙ presheafToSheaf J D`. -/
@[simps!]
noncomputable def sheafificationNatIso :
    𝟭 (Sheaf J D) ≅ sheafToPresheaf J D ⋙ presheafToSheaf J D 
goal: CategoryTheory.Functor.id (CategoryTheory.Sheaf J D) ≅
  (CategoryTheory.sheafToPresheaf J D).comp (CategoryTheory.presheafToSheaf J D)