File: Mathlib/CategoryTheory/Sites/SheafHom.lean

full_name: CategoryTheory.presheafHom_obj
code: /-- Given two presheaves `F` and `G` on a category `C` with values in a category `A`,
this `presheafHom F G` is the presheaf of types which sends an object `X : C`
to the type of morphisms between the "restrictions" of `F` and `G` to the category `Over X`. -/
@[simps! obj]
def presheafHom : Cᵒᵖ ⥤ Type _ 
goal: (CategoryTheory.presheafHom F G).obj X =
  ((CategoryTheory.Over.forget (Opposite.unop X)).op.comp F ⟶ (CategoryTheory.Over.forget (Opposite.unop X)).op.comp G)

full_name: CategoryTheory.presheafHom
code: /-- Given two presheaves `F` and `G` on a category `C` with values in a category `A`,
this `presheafHom F G` is the presheaf of types which sends an object `X : C`
to the type of morphisms between the "restrictions" of `F` and `G` to the category `Over X`. -/
@[simps! obj]
def presheafHom : Cᵒᵖ ⥤ Type _ 
goal: CategoryTheory.Functor Cᵒᵖ (Type (max (max u v) v'))

full_name: CategoryTheory.presheafHom_map_app
code: /-- Equational lemma for the presheaf structure on `presheafHom`.
It is advisable to use this lemma rather than `dsimp [presheafHom]` which may result
in the need to prove equalities of objects in an `Over` category. -/
lemma presheafHom_map_app {X Y Z : C} (f : Z ⟶ Y) (g : Y ⟶ X) (h : Z ⟶ X) (w : f ≫ g = h)
    (α : (presheafHom F G).obj (op X)) :
    ((presheafHom F G).map g.op α).app (op (Over.mk f)) =
      α.app (op (Over.mk h)) 
goal: ((CategoryTheory.presheafHom F G).map g.op α).app (Opposite.op (CategoryTheory.Over.mk f)) =
  α.app (Opposite.op (CategoryTheory.Over.mk h))

full_name: CategoryTheory.presheafHom_map_app_op_mk_id
code: @[simp]
lemma presheafHom_map_app_op_mk_id {X Y : C} (g : Y ⟶ X)
    (α : (presheafHom F G).obj (op X)) :
    ((presheafHom F G).map g.op α).app (op (Over.mk (𝟙 Y))) =
      α.app (op (Over.mk g)) 
goal: ((CategoryTheory.presheafHom F G).map g.op α).app
    (Opposite.op (CategoryTheory.Over.mk (CategoryTheory.CategoryStruct.id Y))) =
  α.app (Opposite.op (CategoryTheory.Over.mk g))

full_name: CategoryTheory.presheafHomSectionsEquiv
code: /-- The sections of the presheaf `presheafHom F G` identify to morphisms `F ⟶ G`. -/
def presheafHomSectionsEquiv : (presheafHom F G).sections ≃ (F ⟶ G) 
goal: ↑(CategoryTheory.presheafHom F G).sections ≃ (F ⟶ G)

full_name: CategoryTheory.PresheafHom.isAmalgamation_iff
code: lemma PresheafHom.isAmalgamation_iff {X : C} (S : Sieve X)
    (x : Presieve.FamilyOfElements (presheafHom F G) S.arrows)
    (hx : x.Compatible) (y : (presheafHom F G).obj (op X)) :
    x.IsAmalgamation y ↔ ∀ (Y : C) (g : Y ⟶ X) (hg : S g),
      y.app (op (Over.mk g)) = (x g hg).app (op (Over.mk (𝟙 Y))) 
goal: x.IsAmalgamation y ↔
  ∀ (Y : C) (g : Y ⟶ X) (hg : S.arrows g),
    y.app (Opposite.op (CategoryTheory.Over.mk g)) =
      (x g hg).app (Opposite.op (CategoryTheory.Over.mk (CategoryTheory.CategoryStruct.id Y)))

full_name: CategoryTheory.PresheafHom.IsSheafFor.exists_app
code: lemma exists_app :
    ∃ (φ : F.obj (op Y) ⟶ G.obj (op Y)),
      ∀ {Z : C} (p : Z ⟶ Y) (hp : S (p ≫ g)), φ ≫ G.map p.op =
        F.map p.op ≫ (x (p ≫ g) hp).app ⟨Over.mk (𝟙 Z)⟩ 
goal: ∃ φ,
  ∀ {Z : C} (p : Z ⟶ Y) (hp : S.arrows (CategoryTheory.CategoryStruct.comp p g)),
    CategoryTheory.CategoryStruct.comp φ (G.map p.op) =
      CategoryTheory.CategoryStruct.comp (F.map p.op)
        ((x (CategoryTheory.CategoryStruct.comp p g) hp).app
          (Opposite.op (CategoryTheory.Over.mk (CategoryTheory.CategoryStruct.id Z))))

full_name: CategoryTheory.PresheafHom.IsSheafFor.app
code: /-- Auxiliary definition for `presheafHom_isSheafFor`. -/
noncomputable def app : F.obj (op Y) ⟶ G.obj (op Y) 
goal: F.obj (Opposite.op Y) ⟶ G.obj (Opposite.op Y)

full_name: CategoryTheory.PresheafHom.IsSheafFor.app_cond
code: lemma app_cond {Z : C} (p : Z ⟶ Y) (hp : S (p ≫ g)) :
    app hG x hx g ≫ G.map p.op = F.map p.op ≫ (x (p ≫ g) hp).app ⟨Over.mk (𝟙 Z)⟩ 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.PresheafHom.IsSheafFor.app hG x hx g) (G.map p.op) =
  CategoryTheory.CategoryStruct.comp (F.map p.op)
    ((x (CategoryTheory.CategoryStruct.comp p g) hp).app
      (Opposite.op (CategoryTheory.Over.mk (CategoryTheory.CategoryStruct.id Z))))

full_name: CategoryTheory.presheafHom_isSheafFor
code: lemma presheafHom_isSheafFor  :
    Presieve.IsSheafFor (presheafHom F G) S.arrows 
goal: CategoryTheory.Presieve.IsSheafFor (CategoryTheory.presheafHom F G) S.arrows

full_name: CategoryTheory.Presheaf.IsSheaf.hom
code: lemma Presheaf.IsSheaf.hom (hG : Presheaf.IsSheaf J G) :
    Presheaf.IsSheaf J (presheafHom F G) 
goal: CategoryTheory.Presheaf.IsSheaf J (CategoryTheory.presheafHom F G)

full_name: CategoryTheory.sheafHom'
code: /-- The underlying presheaf of `sheafHom F G`. It is isomorphic to `presheafHom F.1 G.1`
(see `sheafHom'Iso`), but has better definitional properties. -/
def sheafHom' (F G : Sheaf J A) : Cᵒᵖ ⥤ Type _ 
goal: CategoryTheory.Functor Cᵒᵖ (Type (max (max u v) v'))

full_name: CategoryTheory.sheafHom'Iso
code: /-- The canonical isomorphism `sheafHom' F G ≅ presheafHom F.1 G.1`. -/
def sheafHom'Iso (F G : Sheaf J A) :
    sheafHom' F G ≅ presheafHom F.1 G.1 
goal: CategoryTheory.sheafHom' F G ≅ CategoryTheory.presheafHom F.val G.val

full_name: CategoryTheory.sheafHom
code: /-- Given two sheaves `F` and `G` on a site `(C, J)` with values in a category `A`,
this `sheafHom F G` is the sheaf of types which sends an object `X : C`
to the type of morphisms between the "restrictions" of `F` and `G` to the category `Over X`. -/
def sheafHom (F G : Sheaf J A) : Sheaf J (Type _) 
goal: CategoryTheory.Sheaf J (Type (max (max u v') v))

full_name: CategoryTheory.sheafHomSectionsEquiv
code: /-- The sections of the sheaf `sheafHom F G` identify to morphisms `F ⟶ G`. -/
def sheafHomSectionsEquiv (F G : Sheaf J A) :
    (sheafHom F G).1.sections ≃ (F ⟶ G) 
goal: ↑(CategoryTheory.sheafHom F G).val.sections ≃ (F ⟶ G)

full_name: CategoryTheory.sheafHomSectionsEquiv_symm_apply_coe_apply
code: @[simp]
lemma sheafHomSectionsEquiv_symm_apply_coe_apply {F G : Sheaf J A} (φ : F ⟶ G) (X : Cᵒᵖ) :
    ((sheafHomSectionsEquiv F G).symm φ).1 X = (J.overPullback A X.unop).map φ 
goal: ↑((CategoryTheory.sheafHomSectionsEquiv F G).symm φ) X = (J.overPullback A (Opposite.unop X)).map φ