File: Mathlib/CategoryTheory/Sites/Discrete.lean

full_name: CategoryTheory.Sheaf.IsDiscrete
code: /--
A sheaf is discrete if it is a discrete object of the "underlying object" functor from the sheaf
category to the target category.
-/
abbrev IsDiscrete (F : Sheaf J A) : Prop 
goal: Prop

full_name: CategoryTheory.Sheaf.isDiscrete_of_iso
code: lemma isDiscrete_of_iso {F : Sheaf J A} {X : A}
    (i : F ≅ (constantSheaf J A).obj X) : IsDiscrete J ht F 
goal: CategoryTheory.Sheaf.IsDiscrete J ht F

full_name: CategoryTheory.Sheaf.isDiscrete_iff_mem_essImage
code: lemma isDiscrete_iff_mem_essImage (F : Sheaf J A) :
    F.IsDiscrete J ht ↔ F ∈ (constantSheaf J A).essImage 
goal: CategoryTheory.Sheaf.IsDiscrete J ht F ↔ F ∈ (CategoryTheory.constantSheaf J A).essImage

full_name: CategoryTheory.Sheaf.isDiscrete_iff_mem_essImage'
code: lemma isDiscrete_iff_mem_essImage' {L : A ⥤ Sheaf J A} (adj : L ⊣ (sheafSections J A).obj ⟨t⟩)
    (F : Sheaf J A) :
    IsDiscrete J ht F ↔ F ∈ L.essImage 
goal: CategoryTheory.Sheaf.IsDiscrete J ht F ↔ F ∈ L.essImage

full_name: CategoryTheory.Sheaf.isDiscrete_iff_isIso_counit_app
code: lemma isDiscrete_iff_isIso_counit_app {L : A ⥤ Sheaf J A} (adj : L ⊣ (sheafSections J A).obj ⟨t⟩)
    (F : Sheaf J A) :
    IsDiscrete J ht F ↔ IsIso (adj.counit.app F) 
goal: CategoryTheory.Sheaf.IsDiscrete J ht F ↔ CategoryTheory.IsIso (adj.counit.app F)

full_name: CategoryTheory.Sheaf.equivCommuteConstant
code: /--
The constant sheaf functor commutes up to isomorphism with any equivalence of sheaf categories.

This is an auxiliary definition used to prove `Sheaf.isDiscrete_iff` below, which says that the
property of a sheaf of being a discrete object is invariant under equivalence of sheaf categories.
-/
noncomputable def equivCommuteConstant :
    let e : Sheaf J A ≌ Sheaf K A :=
      sheafEquiv G J K A
    constantSheaf J A ⋙ e.functor ≅ constantSheaf K A 
goal: let e := CategoryTheory.Functor.IsDenseSubsite.sheafEquiv G J K A;
CategoryTheory.constantSheaf J A ⋙ e.functor ≅ CategoryTheory.constantSheaf K A

full_name: CategoryTheory.Sheaf.equivCommuteConstant'
code: /--
The constant sheaf functor commutes up to isomorphism with any equivalence of sheaf categories.

This is an auxiliary definition used to prove `Sheaf.isDiscrete_iff` below, which says that the
property of a sheaf of being a discrete object is invariant under equivalence of sheaf categories.
-/
noncomputable def equivCommuteConstant' :
    let e : Sheaf J A ≌ Sheaf K A :=
      sheafEquiv G J K A
    constantSheaf J A ≅ constantSheaf K A ⋙ e.inverse 
goal: let e := CategoryTheory.Functor.IsDenseSubsite.sheafEquiv G J K A;
CategoryTheory.constantSheaf J A ≅ CategoryTheory.constantSheaf K A ⋙ e.inverse

full_name: CategoryTheory.Sheaf.isDiscrete_iff_of_equivalence
code: /--
The property of a sheaf of being a discrete object is invariant under equivalence of sheaf
categories.
-/
lemma isDiscrete_iff_of_equivalence (F : Sheaf K A) :
    let e : Sheaf J A ≌ Sheaf K A :=
      sheafEquiv G J K A
    haveI : (constantSheaf K A).Faithful :=
      Functor.Faithful.of_iso (equivCommuteConstant J A ht K G ht')
    haveI : (constantSheaf K A).Full :=
      Functor.Full.of_iso (equivCommuteConstant J A ht K G ht')
    (e.inverse.obj F).IsDiscrete J ht ↔ IsDiscrete K ht' F 
goal: let e := CategoryTheory.Functor.IsDenseSubsite.sheafEquiv G J K A;
CategoryTheory.Sheaf.IsDiscrete J ht (e.inverse.obj F) ↔ CategoryTheory.Sheaf.IsDiscrete K ht' F

full_name: CategoryTheory.Sheaf.constantCommuteCompose_inv_app_val_app
code: /-- The constant sheaf functor commutes with `sheafCompose` up to isomorphism. -/
@[simps!]
noncomputable def constantCommuteCompose :
    constantSheaf J A ⋙ sheafCompose J U ≅ U ⋙ constantSheaf J B 
goal: ∀ (X_1 : Cᵒᵖ),
  ((CategoryTheory.Sheaf.constantCommuteCompose J U).inv.app X).val.app X_1 =
    ((CategoryTheory.presheafToSheaf J B).map ((CategoryTheory.Functor.compConstIso Cᵒᵖ U).hom.app X)).val.app X_1 ≫
      ((CategoryTheory.sheafComposeNatIso J U (CategoryTheory.sheafificationAdjunction J A)
                    (CategoryTheory.sheafificationAdjunction J B)).hom.app
              ((CategoryTheory.Functor.const Cᵒᵖ).obj X)).val.app
        X_1

full_name: CategoryTheory.Sheaf.constantCommuteCompose
code: /-- The constant sheaf functor commutes with `sheafCompose` up to isomorphism. -/
@[simps!]
noncomputable def constantCommuteCompose :
    constantSheaf J A ⋙ sheafCompose J U ≅ U ⋙ constantSheaf J B 
goal: CategoryTheory.constantSheaf J A ⋙ CategoryTheory.sheafCompose J U ≅ U ⋙ CategoryTheory.constantSheaf J B

full_name: CategoryTheory.Sheaf.constantCommuteCompose_hom_app_val_app
code: /-- The constant sheaf functor commutes with `sheafCompose` up to isomorphism. -/
@[simps!]
noncomputable def constantCommuteCompose :
    constantSheaf J A ⋙ sheafCompose J U ≅ U ⋙ constantSheaf J B 
goal: ∀ (X_1 : Cᵒᵖ),
  ((CategoryTheory.Sheaf.constantCommuteCompose J U).hom.app X).val.app X_1 =
    ((CategoryTheory.sheafComposeNatIso J U (CategoryTheory.sheafificationAdjunction J A)
                    (CategoryTheory.sheafificationAdjunction J B)).inv.app
              ((CategoryTheory.Functor.const Cᵒᵖ).obj X)).val.app
        X_1 ≫
      ((CategoryTheory.presheafToSheaf J B).map ((CategoryTheory.Functor.compConstIso Cᵒᵖ U).inv.app X)).val.app X_1

full_name: CategoryTheory.Sheaf.sheafComposeNatIso_app_counit
code: lemma sheafComposeNatIso_app_counit (P : Sheaf J A) :
    (sheafComposeNatIso J U (sheafificationAdjunction J A)
      (sheafificationAdjunction J B)).hom.app _ ≫ (sheafCompose J U).map
        ((sheafificationAdjunction J A).counit.app P) =
          (sheafificationAdjunction J B).counit.app ((sheafCompose J U).obj P) 
goal: (CategoryTheory.sheafComposeNatIso J U (CategoryTheory.sheafificationAdjunction J A)
            (CategoryTheory.sheafificationAdjunction J B)).hom.app
      ((CategoryTheory.sheafToPresheaf J A).obj P) ≫
    (CategoryTheory.sheafCompose J U).map ((CategoryTheory.sheafificationAdjunction J A).counit.app P) =
  (CategoryTheory.sheafificationAdjunction J B).counit.app ((CategoryTheory.sheafCompose J U).obj P)

full_name: CategoryTheory.Sheaf.constantCommuteComposeApp_comp_counit
code: lemma constantCommuteComposeApp_comp_counit (F : Sheaf J A) :
    ((constantCommuteCompose J U).app _).hom ≫
      (constantSheafAdj J B ht).counit.app ((sheafCompose J U).obj F) =
        (sheafCompose J U).map ((constantSheafAdj J A ht).counit.app F) 
goal: ((CategoryTheory.Sheaf.constantCommuteCompose J U).app (F.val.obj (Opposite.op t))).hom ≫
    (CategoryTheory.constantSheafAdj J B ht).counit.app ((CategoryTheory.sheafCompose J U).obj F) =
  (CategoryTheory.sheafCompose J U).map ((CategoryTheory.constantSheafAdj J A ht).counit.app F)

full_name: _private.Mathlib.CategoryTheory.Sites.Discrete.0.CategoryTheory.Sheaf.sheafifyComposeIso_comp_sheafCompose_map_constantSheafAdj_counit
code: /-- Auxiliary lemma for `sheafCompose_reflects_discrete`. -/
private lemma sheafifyComposeIso_comp_sheafCompose_map_constantSheafAdj_counit :
  (sheafifyComposeIso J U ((const Cᵒᵖ).obj (F.val.obj { unop := t }))).hom ≫
    ((sheafCompose J U).map ((constantSheafAdj J A ht).counit.app F)).val =
      ((presheafToSheaf J B ⋙ sheafToPresheaf J B).mapIso (constComp Cᵒᵖ _ U)).hom ≫
        ((constantSheafAdj J B ht).counit.app ((sheafCompose J U).obj F)).val 
goal: (CategoryTheory.sheafifyComposeIso J U ((CategoryTheory.Functor.const Cᵒᵖ).obj (F.val.obj (Opposite.op t)))).hom ≫
    ((CategoryTheory.sheafCompose J U).map ((CategoryTheory.constantSheafAdj J A ht).counit.app F)).val =
  ((CategoryTheory.presheafToSheaf J B ⋙ CategoryTheory.sheafToPresheaf J B).mapIso
        (CategoryTheory.Functor.constComp Cᵒᵖ (F.val.obj (Opposite.op t)) U)).hom ≫
    ((CategoryTheory.constantSheafAdj J B ht).counit.app ((CategoryTheory.sheafCompose J U).obj F)).val

full_name: _private.Mathlib.CategoryTheory.Sites.Discrete.0.CategoryTheory.Sheaf.constantSheafAdj_counit_w
code: /-- Auxiliary lemma for `sheafCompose_reflects_discrete`. -/
private lemma constantSheafAdj_counit_w :
    ((sheafifyComposeIso J U ((const Cᵒᵖ).obj (F.val.obj ⟨t⟩))).symm ≪≫
      (presheafToSheaf J B ⋙ sheafToPresheaf J B).mapIso (constComp Cᵒᵖ (F.val.obj ⟨t⟩) U)).hom ≫
        ((constantSheafAdj J B ht).counit.app ((sheafCompose J U).obj F)).val =
          ((sheafCompose J U).map ((constantSheafAdj J A ht).counit.app F)).val 
goal: ((CategoryTheory.sheafifyComposeIso J U ((CategoryTheory.Functor.const Cᵒᵖ).obj (F.val.obj (Opposite.op t)))).symm ≪≫
        (CategoryTheory.presheafToSheaf J B ⋙ CategoryTheory.sheafToPresheaf J B).mapIso
          (CategoryTheory.Functor.constComp Cᵒᵖ (F.val.obj (Opposite.op t)) U)).hom ≫
    ((CategoryTheory.constantSheafAdj J B ht).counit.app ((CategoryTheory.sheafCompose J U).obj F)).val =
  ((CategoryTheory.sheafCompose J U).map ((CategoryTheory.constantSheafAdj J A ht).counit.app F)).val

full_name: CategoryTheory.Sheaf.sheafCompose_reflects_discrete
code: lemma sheafCompose_reflects_discrete [(sheafCompose J U).ReflectsIsomorphisms]
    [((sheafCompose J U).obj F).IsDiscrete J ht] :
    F.IsDiscrete J ht 
goal: CategoryTheory.Sheaf.IsDiscrete J ht F

full_name: CategoryTheory.Sheaf.instIsDiscreteObjSheafCompose
code: instance [h : F.IsDiscrete J ht] :
    ((sheafCompose J U).obj F).IsDiscrete J ht 
goal: CategoryTheory.Sheaf.IsDiscrete J ht ((CategoryTheory.sheafCompose J U).obj F)

full_name: CategoryTheory.Sheaf.isDiscrete_iff_forget
code: lemma isDiscrete_iff_forget [(sheafCompose J U).ReflectsIsomorphisms] : F.IsDiscrete J ht ↔
    ((sheafCompose J U).obj F).IsDiscrete J ht 
goal: CategoryTheory.Sheaf.IsDiscrete J ht F ↔ CategoryTheory.Sheaf.IsDiscrete J ht ((CategoryTheory.sheafCompose J U).obj F)