File: Mathlib/CategoryTheory/Sites/LocallySurjective.lean

full_name: CategoryTheory.Presheaf.imageSieve_apply
code: /-- Given `f : F ⟶ G`, a morphism between presieves, and `s : G.obj (op U)`, this is the sieve
of `U` consisting of the `i : V ⟶ U` such that `s` restricted along `i` is in the image of `f`. -/
@[simps (config := .lemmasOnly)]
def imageSieve {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : C} (s : G.obj (op U)) : Sieve U 
goal: (CategoryTheory.Presheaf.imageSieve f s).arrows i = ∃ t, (f.app (Opposite.op V)) t = (G.map i.op) s

full_name: CategoryTheory.Presheaf.imageSieve
code: /-- Given `f : F ⟶ G`, a morphism between presieves, and `s : G.obj (op U)`, this is the sieve
of `U` consisting of the `i : V ⟶ U` such that `s` restricted along `i` is in the image of `f`. -/
@[simps (config := .lemmasOnly)]
def imageSieve {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : C} (s : G.obj (op U)) : Sieve U 
goal: CategoryTheory.Sieve U

full_name: CategoryTheory.Presheaf.imageSieve_eq_sieveOfSection
code: theorem imageSieve_eq_sieveOfSection {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : C} (s : G.obj (op U)) :
    imageSieve f s = (imagePresheaf (whiskerRight f (forget A))).sieveOfSection s 
goal: CategoryTheory.Presheaf.imageSieve f s =
  (CategoryTheory.GrothendieckTopology.imagePresheaf
        (CategoryTheory.whiskerRight f (CategoryTheory.forget A))).sieveOfSection
    s

full_name: CategoryTheory.Presheaf.imageSieve_whisker_forget
code: theorem imageSieve_whisker_forget {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : C} (s : G.obj (op U)) :
    imageSieve (whiskerRight f (forget A)) s = imageSieve f s 
goal: CategoryTheory.Presheaf.imageSieve (CategoryTheory.whiskerRight f (CategoryTheory.forget A)) s =
  CategoryTheory.Presheaf.imageSieve f s

full_name: CategoryTheory.Presheaf.imageSieve_app
code: theorem imageSieve_app {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : C} (s : F.obj (op U)) :
    imageSieve f (f.app _ s) = ⊤ 
goal: CategoryTheory.Presheaf.imageSieve f ((f.app (Opposite.op U)) s) = ⊤

full_name: CategoryTheory.Presheaf.localPreimage
code: /-- If a morphism `g : V ⟶ U.unop` belongs to the sieve `imageSieve f s g`, then
this is choice of a preimage of `G.map g.op s` in `F.obj (op V)`, see
`app_localPreimage`.-/
noncomputable def localPreimage {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : Cᵒᵖ} (s : G.obj U)
    {V : C} (g : V ⟶ U.unop) (hg : imageSieve f s g) :
    F.obj (op V) 
goal: (CategoryTheory.forget A).obj (F.obj (Opposite.op V))

full_name: CategoryTheory.Presheaf.app_localPreimage
code: @[simp]
lemma app_localPreimage {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : Cᵒᵖ} (s : G.obj U)
    {V : C} (g : V ⟶ U.unop) (hg : imageSieve f s g) :
    f.app _ (localPreimage f s g hg) = G.map g.op s 
goal: (f.app (Opposite.op V)) (CategoryTheory.Presheaf.localPreimage f s g hg) = (G.map g.op) s

full_name: CategoryTheory.Presheaf.IsLocallySurjective
code: /-- A morphism of presheaves `f : F ⟶ G` is locally surjective with respect to a grothendieck
topology if every section of `G` is locally in the image of `f`. -/
class IsLocallySurjective {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) : Prop where
  imageSieve_mem {U : C} (s : G.obj (op U)) : imageSieve f s ∈ J U
goal: Prop

full_name: CategoryTheory.Presheaf.IsLocallySurjective.imageSieve_mem
code: /-- A morphism of presheaves `f : F ⟶ G` is locally surjective with respect to a grothendieck
topology if every section of `G` is locally in the image of `f`. -/
class IsLocallySurjective {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) : Prop where
  imageSieve_mem {U : C} (s : G.obj (op U)) : imageSieve f s ∈ J U
goal: CategoryTheory.Presheaf.imageSieve f s ∈ J.sieves U

full_name: CategoryTheory.Presheaf.imageSieve_mem
code: lemma imageSieve_mem {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) [IsLocallySurjective J f] {U : Cᵒᵖ}
    (s : G.obj U) : imageSieve f s ∈ J U.unop 
goal: CategoryTheory.Presheaf.imageSieve f s ∈ J.sieves (Opposite.unop U)

full_name: CategoryTheory.Presheaf.instIsLocallySurjectiveWhiskerRightOppositeForget
code: instance {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) [IsLocallySurjective J f] :
    IsLocallySurjective J (whiskerRight f (forget A)) 
goal: CategoryTheory.Presheaf.IsLocallySurjective J (CategoryTheory.whiskerRight f (CategoryTheory.forget A))

full_name: CategoryTheory.Presheaf.isLocallySurjective_iff_imagePresheaf_sheafify_eq_top
code: theorem isLocallySurjective_iff_imagePresheaf_sheafify_eq_top {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) :
    IsLocallySurjective J f ↔ (imagePresheaf (whiskerRight f (forget A))).sheafify J = ⊤ 
goal: CategoryTheory.Presheaf.IsLocallySurjective J f ↔
  CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J
      (CategoryTheory.GrothendieckTopology.imagePresheaf (CategoryTheory.whiskerRight f (CategoryTheory.forget A))) =
    ⊤

full_name: CategoryTheory.Presheaf.isLocallySurjective_iff_imagePresheaf_sheafify_eq_top'
code: theorem isLocallySurjective_iff_imagePresheaf_sheafify_eq_top' {F G : Cᵒᵖ ⥤ Type w} (f : F ⟶ G) :
    IsLocallySurjective J f ↔ (imagePresheaf f).sheafify J = ⊤ 
goal: CategoryTheory.Presheaf.IsLocallySurjective J f ↔
  CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J (CategoryTheory.GrothendieckTopology.imagePresheaf f) = ⊤

full_name: CategoryTheory.Presheaf.isLocallySurjective_iff_whisker_forget
code: theorem isLocallySurjective_iff_whisker_forget {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) :
    IsLocallySurjective J f ↔ IsLocallySurjective J (whiskerRight f (forget A)) 
goal: CategoryTheory.Presheaf.IsLocallySurjective J f ↔
  CategoryTheory.Presheaf.IsLocallySurjective J (CategoryTheory.whiskerRight f (CategoryTheory.forget A))

full_name: CategoryTheory.Presheaf.isLocallySurjective_of_surjective
code: theorem isLocallySurjective_of_surjective {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G)
    (H : ∀ U, Function.Surjective (f.app U)) : IsLocallySurjective J f 
goal: CategoryTheory.Presheaf.IsLocallySurjective J f

full_name: CategoryTheory.Presheaf.isLocallySurjective_of_iso
code: instance isLocallySurjective_of_iso {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) [IsIso f] :
    IsLocallySurjective J f 
goal: CategoryTheory.Presheaf.IsLocallySurjective J f

full_name: CategoryTheory.Presheaf.isLocallySurjective_comp
code: instance isLocallySurjective_comp {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} (f₁ : F₁ ⟶ F₂) (f₂ : F₂ ⟶ F₃)
    [IsLocallySurjective J f₁] [IsLocallySurjective J f₂] :
    IsLocallySurjective J (f₁ ≫ f₂) 
goal: CategoryTheory.Presheaf.IsLocallySurjective J (f₁ ≫ f₂)

full_name: CategoryTheory.Presheaf.isLocallySurjective_of_isLocallySurjective
code: lemma isLocallySurjective_of_isLocallySurjective
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} (f₁ : F₁ ⟶ F₂) (f₂ : F₂ ⟶ F₃)
    [IsLocallySurjective J (f₁ ≫ f₂)] :
    IsLocallySurjective J f₂ 
goal: CategoryTheory.Presheaf.IsLocallySurjective J f₂

full_name: CategoryTheory.Presheaf.isLocallySurjective_of_isLocallySurjective_fac
code: lemma isLocallySurjective_of_isLocallySurjective_fac
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} {f₁ : F₁ ⟶ F₂} {f₂ : F₂ ⟶ F₃} {f₃ : F₁ ⟶ F₃} (fac : f₁ ≫ f₂ = f₃)
    [IsLocallySurjective J f₃] : IsLocallySurjective J f₂ 
goal: CategoryTheory.Presheaf.IsLocallySurjective J f₂

full_name: CategoryTheory.Presheaf.isLocallySurjective_iff_of_fac
code: lemma isLocallySurjective_iff_of_fac
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} {f₁ : F₁ ⟶ F₂} {f₂ : F₂ ⟶ F₃} {f₃ : F₁ ⟶ F₃} (fac : f₁ ≫ f₂ = f₃)
    [IsLocallySurjective J f₁] :
    IsLocallySurjective J f₃ ↔ IsLocallySurjective J f₂ 
goal: CategoryTheory.Presheaf.IsLocallySurjective J f₃ ↔ CategoryTheory.Presheaf.IsLocallySurjective J f₂

full_name: CategoryTheory.Presheaf.comp_isLocallySurjective_iff
code: lemma comp_isLocallySurjective_iff
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} (f₁ : F₁ ⟶ F₂) (f₂ : F₂ ⟶ F₃)
    [IsLocallySurjective J f₁] :
    IsLocallySurjective J (f₁ ≫ f₂) ↔ IsLocallySurjective J f₂ 
goal: CategoryTheory.Presheaf.IsLocallySurjective J (f₁ ≫ f₂) ↔ CategoryTheory.Presheaf.IsLocallySurjective J f₂

full_name: CategoryTheory.Presheaf.isLocallySurjective_of_le
code: lemma isLocallySurjective_of_le {K : GrothendieckTopology C} (hJK : J ≤ K) {F G : Cᵒᵖ ⥤ A}
    (f : F ⟶ G) (h : IsLocallySurjective J f) : IsLocallySurjective K f 
goal: CategoryTheory.Presheaf.IsLocallySurjective K f

full_name: CategoryTheory.Presheaf.isLocallyInjective_of_isLocallyInjective_of_isLocallySurjective
code: lemma isLocallyInjective_of_isLocallyInjective_of_isLocallySurjective
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} (f₁ : F₁ ⟶ F₂) (f₂ : F₂ ⟶ F₃)
    [IsLocallyInjective J (f₁ ≫ f₂)] [IsLocallySurjective J f₁] :
    IsLocallyInjective J f₂ 
goal: CategoryTheory.Presheaf.IsLocallyInjective J f₂

full_name: CategoryTheory.Presheaf.isLocallyInjective_of_isLocallyInjective_of_isLocallySurjective_fac
code: lemma isLocallyInjective_of_isLocallyInjective_of_isLocallySurjective_fac
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} {f₁ : F₁ ⟶ F₂} {f₂ : F₂ ⟶ F₃} (f₃ : F₁ ⟶ F₃) (fac : f₁ ≫ f₂ = f₃)
    [IsLocallyInjective J f₃] [IsLocallySurjective J f₁] :
    IsLocallyInjective J f₂ 
goal: CategoryTheory.Presheaf.IsLocallyInjective J f₂

full_name: CategoryTheory.Presheaf.isLocallySurjective_of_isLocallySurjective_of_isLocallyInjective
code: lemma isLocallySurjective_of_isLocallySurjective_of_isLocallyInjective
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} (f₁ : F₁ ⟶ F₂) (f₂ : F₂ ⟶ F₃)
    [IsLocallySurjective J (f₁ ≫ f₂)] [IsLocallyInjective J f₂] :
    IsLocallySurjective J f₁ 
goal: CategoryTheory.Presheaf.IsLocallySurjective J f₁

full_name: CategoryTheory.Presheaf.isLocallySurjective_of_isLocallySurjective_of_isLocallyInjective_fac
code: lemma isLocallySurjective_of_isLocallySurjective_of_isLocallyInjective_fac
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} {f₁ : F₁ ⟶ F₂} {f₂ : F₂ ⟶ F₃} (f₃ : F₁ ⟶ F₃) (fac : f₁ ≫ f₂ = f₃)
    [IsLocallySurjective J f₃] [IsLocallyInjective J f₂] :
    IsLocallySurjective J f₁ 
goal: CategoryTheory.Presheaf.IsLocallySurjective J f₁

full_name: CategoryTheory.Presheaf.comp_isLocallyInjective_iff
code: lemma comp_isLocallyInjective_iff
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} (f₁ : F₁ ⟶ F₂) (f₂ : F₂ ⟶ F₃)
    [IsLocallyInjective J f₁] [IsLocallySurjective J f₁] :
    IsLocallyInjective J (f₁ ≫ f₂) ↔ IsLocallyInjective J f₂ 
goal: CategoryTheory.Presheaf.IsLocallyInjective J (f₁ ≫ f₂) ↔ CategoryTheory.Presheaf.IsLocallyInjective J f₂

full_name: CategoryTheory.Presheaf.isLocallySurjective_comp_iff
code: lemma isLocallySurjective_comp_iff
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} (f₁ : F₁ ⟶ F₂) (f₂ : F₂ ⟶ F₃)
    [IsLocallyInjective J f₂] [IsLocallySurjective J f₂] :
    IsLocallySurjective J (f₁ ≫ f₂) ↔ IsLocallySurjective J f₁ 
goal: CategoryTheory.Presheaf.IsLocallySurjective J (f₁ ≫ f₂) ↔ CategoryTheory.Presheaf.IsLocallySurjective J f₁

full_name: CategoryTheory.Presheaf.instIsLocallySurjectiveToImagePresheafSheafify
code: instance {F₁ F₂ : Cᵒᵖ ⥤ Type w} (f : F₁ ⟶ F₂) :
    IsLocallySurjective J (toImagePresheafSheafify J f) 
goal: CategoryTheory.Presheaf.IsLocallySurjective J (J.toImagePresheafSheafify f)

full_name: CategoryTheory.Presheaf.sheafificationIsoImagePresheaf
code: /-- The image of `F` in `J.sheafify F` is isomorphic to the sheafification. -/
noncomputable def sheafificationIsoImagePresheaf (F : Cᵒᵖ ⥤ Type max u v) :
    J.sheafify F ≅ ((imagePresheaf (J.toSheafify F)).sheafify J).toPresheaf 
goal: J.sheafify F ≅
  (CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J
      (CategoryTheory.GrothendieckTopology.imagePresheaf (J.toSheafify F))).toPresheaf

full_name: CategoryTheory.Presheaf.isLocallySurjective_toPlus
code: instance isLocallySurjective_toPlus (P : Cᵒᵖ ⥤ Type max u v) :
    IsLocallySurjective J (J.toPlus P) 
goal: CategoryTheory.Presheaf.IsLocallySurjective J (J.toPlus P)

full_name: CategoryTheory.Presheaf.isLocallySurjective_toSheafify
code: instance isLocallySurjective_toSheafify (P : Cᵒᵖ ⥤ Type max u v) :
    IsLocallySurjective J (J.toSheafify P) 
goal: CategoryTheory.Presheaf.IsLocallySurjective J (J.toSheafify P)

full_name: CategoryTheory.Presheaf.isLocallySurjective_toSheafify'
code: instance isLocallySurjective_toSheafify' {D : Type*} [Category D]
    [ConcreteCategory.{max u v} D]
    (P : Cᵒᵖ ⥤ D) [HasWeakSheafify J D] [J.HasSheafCompose (forget D)]
    [J.PreservesSheafification (forget D)] :
    IsLocallySurjective J (toSheafify J P) 
goal: CategoryTheory.Presheaf.IsLocallySurjective J (CategoryTheory.toSheafify J P)

full_name: CategoryTheory.Sheaf.IsLocallySurjective
code: /-- If `φ : F₁ ⟶ F₂` is a morphism of sheaves, this is an abbreviation for
`Presheaf.IsLocallySurjective J φ.val`. -/
abbrev IsLocallySurjective 
goal: Prop

full_name: CategoryTheory.Sheaf.isLocallySurjective_sheafToPresheaf_map_iff
code: lemma isLocallySurjective_sheafToPresheaf_map_iff :
    Presheaf.IsLocallySurjective J ((sheafToPresheaf J A).map φ) ↔ IsLocallySurjective φ 
goal: CategoryTheory.Presheaf.IsLocallySurjective J ((CategoryTheory.sheafToPresheaf J A).map φ) ↔
  CategoryTheory.Sheaf.IsLocallySurjective φ

full_name: CategoryTheory.Sheaf.isLocallySurjective_comp
code: instance isLocallySurjective_comp [IsLocallySurjective φ] [IsLocallySurjective ψ] :
    IsLocallySurjective (φ ≫ ψ) 
goal: CategoryTheory.Sheaf.IsLocallySurjective (φ ≫ ψ)

full_name: CategoryTheory.Sheaf.isLocallySurjective_of_iso
code: instance isLocallySurjective_of_iso [IsIso φ] : IsLocallySurjective φ 
goal: CategoryTheory.Sheaf.IsLocallySurjective φ

full_name: CategoryTheory.Sheaf.instIsLocallySurjectiveToImageSheaf
code: instance {F G : Sheaf J (Type w)} (f : F ⟶ G) :
    IsLocallySurjective (toImageSheaf f) 
goal: CategoryTheory.Sheaf.IsLocallySurjective (CategoryTheory.GrothendieckTopology.toImageSheaf f)

full_name: CategoryTheory.Sheaf.instIsLocallySurjectiveMapTypeSheafComposeForget
code: instance [IsLocallySurjective φ] :
    IsLocallySurjective ((sheafCompose J (forget A)).map φ) 
goal: CategoryTheory.Sheaf.IsLocallySurjective ((CategoryTheory.sheafCompose J (CategoryTheory.forget A)).map φ)

full_name: CategoryTheory.Sheaf.isLocallySurjective_iff_isIso
code: theorem isLocallySurjective_iff_isIso {F G : Sheaf J (Type w)} (f : F ⟶ G) :
    IsLocallySurjective f ↔ IsIso (imageSheafι f) 
goal: CategoryTheory.Sheaf.IsLocallySurjective f ↔ CategoryTheory.IsIso (CategoryTheory.GrothendieckTopology.imageSheafι f)

full_name: CategoryTheory.Sheaf.epi_of_isLocallySurjective'
code: instance epi_of_isLocallySurjective' {F₁ F₂ : Sheaf J (Type w)} (φ : F₁ ⟶ F₂)
    [IsLocallySurjective φ] : Epi φ 
goal: CategoryTheory.Epi φ

full_name: CategoryTheory.Sheaf.epi_of_isLocallySurjective
code: instance epi_of_isLocallySurjective [IsLocallySurjective φ] : Epi φ 
goal: CategoryTheory.Epi φ

full_name: CategoryTheory.Sheaf.isLocallySurjective_iff_epi
code: lemma isLocallySurjective_iff_epi {F G : Sheaf J (Type w)} (φ : F ⟶ G)
    [HasSheafify J (Type w)] :
    IsLocallySurjective φ ↔ Epi φ 
goal: CategoryTheory.Sheaf.IsLocallySurjective φ ↔ CategoryTheory.Epi φ

full_name: CategoryTheory.Presieve.FamilyOfElements.localPreimage
code: /-- Given a morphism `φ : R ⟶ R'` of presheaves of types and `r' : R'.obj X`,
this is the family of elements of `R` defined over the sieve `Presheaf.imageSieve φ r'`
which sends a map in this sieve to an arbitrary choice of a preimage of the
restriction of `r'`. -/
noncomputable def localPreimage :
    FamilyOfElements R (Presheaf.imageSieve φ r').arrows 
goal: CategoryTheory.Presieve.FamilyOfElements R (CategoryTheory.Presheaf.imageSieve φ r').arrows

full_name: CategoryTheory.Presieve.FamilyOfElements.isAmalgamation_map_localPreimage
code: lemma isAmalgamation_map_localPreimage :
    ((localPreimage φ r').map φ).IsAmalgamation r' 
goal: ((CategoryTheory.Presieve.FamilyOfElements.localPreimage φ r').map φ).IsAmalgamation r'