File: Mathlib/Topology/Sheaves/SheafCondition/OpensLeCover.lean

full_name: TopCat.Presheaf.SheafCondition.OpensLeCover
code: /-- The category of open sets contained in some element of the cover.
-/
def OpensLeCover : Type w 
goal: Type w

full_name: TopCat.Presheaf.SheafCondition.instCategoryOpensLeCover
code: instance : Category (OpensLeCover U) 
goal: CategoryTheory.Category.{w, w} (TopCat.Presheaf.SheafCondition.OpensLeCover U)

full_name: TopCat.Presheaf.SheafCondition.instInhabitedOpensLeCoverOfNonempty
code: instance [h : Nonempty ι] : Inhabited (OpensLeCover U) 
goal: Inhabited (TopCat.Presheaf.SheafCondition.OpensLeCover U)

full_name: TopCat.Presheaf.SheafCondition.OpensLeCover.index
code: /-- An arbitrarily chosen index such that `V ≤ U i`.
-/
def index (V : OpensLeCover U) : ι 
goal: ι

full_name: TopCat.Presheaf.SheafCondition.OpensLeCover.homToIndex
code: /-- The morphism from `V` to `U i` for some `i`.
-/
def homToIndex (V : OpensLeCover U) : V.obj ⟶ U (index V) 
goal: V.obj ⟶ U V.index

full_name: TopCat.Presheaf.SheafCondition.opensLeCoverCocone
code: /-- `iSup U` as a cocone over the opens sets contained in some element of the cover.

(In fact this is a colimit cocone.)
-/
def opensLeCoverCocone : Cocone (fullSubcategoryInclusion _ : OpensLeCover U ⥤ Opens X) 
goal: CategoryTheory.Limits.Cocone (CategoryTheory.fullSubcategoryInclusion fun V => ∃ i, V ≤ U i)

full_name: TopCat.Presheaf.IsSheafOpensLeCover
code: /-- An equivalent formulation of the sheaf condition
(which we prove equivalent to the usual one below as
`isSheaf_iff_isSheafOpensLeCover`).

A presheaf is a sheaf if `F` sends the cone `(opensLeCoverCocone U).op` to a limit cone.
(Recall `opensLeCoverCocone U`, has cone point `iSup U`,
mapping down to any `V` which is contained in some `U i`.)
-/
def IsSheafOpensLeCover : Prop 
goal: Prop

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_functor'
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_functor' :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ⥤
    OpensLeCover U 
goal: (CategoryTheory.FullSubcategory fun f =>
    (CategoryTheory.Sieve.generate (TopCat.Presheaf.presieveOfCoveringAux U Y)).arrows f.hom) ⥤
  TopCat.Presheaf.SheafCondition.OpensLeCover U

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_functor'_obj_obj
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_functor' :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ⥤
    OpensLeCover U 
goal: ((TopCat.Presheaf.generateEquivalenceOpensLe_functor' U hY).obj f).obj = f.obj.left

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_functor'_map
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_functor' :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ⥤
    OpensLeCover U 
goal: ∀
  {x x_1 :
    CategoryTheory.FullSubcategory fun f =>
      (CategoryTheory.Sieve.generate (TopCat.Presheaf.presieveOfCoveringAux U Y)).arrows f.hom}
  (g : x ⟶ x_1), (TopCat.Presheaf.generateEquivalenceOpensLe_functor' U hY).map g = g.left

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_inverse'
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_inverse' :
    OpensLeCover U ⥤
    (FullSubcategory fun f : Over Y =>
      (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) 
goal: TopCat.Presheaf.SheafCondition.OpensLeCover U ⥤
  CategoryTheory.FullSubcategory fun f =>
    (CategoryTheory.Sieve.generate (TopCat.Presheaf.presieveOfCoveringAux U Y)).arrows f.hom

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_inverse'_map
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_inverse' :
    OpensLeCover U ⥤
    (FullSubcategory fun f : Over Y =>
      (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) 
goal: ∀ {x x_1 : TopCat.Presheaf.SheafCondition.OpensLeCover U} (g : x ⟶ x_1),
  (TopCat.Presheaf.generateEquivalenceOpensLe_inverse' U hY).map g = CategoryTheory.Over.homMk g ⋯

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_inverse'_obj_obj_hom
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_inverse' :
    OpensLeCover U ⥤
    (FullSubcategory fun f : Over Y =>
      (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) 
goal: ((TopCat.Presheaf.generateEquivalenceOpensLe_inverse' U hY).obj V).obj.hom = CategoryTheory.homOfLE ⋯

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_inverse'_obj_obj_left
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_inverse' :
    OpensLeCover U ⥤
    (FullSubcategory fun f : Over Y =>
      (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) 
goal: ((TopCat.Presheaf.generateEquivalenceOpensLe_inverse' U hY).obj V).obj.left = V.obj

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_inverse'_obj_obj_right_as
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_inverse' :
    OpensLeCover U ⥤
    (FullSubcategory fun f : Over Y =>
      (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) 
goal: ((TopCat.Presheaf.generateEquivalenceOpensLe_inverse' U hY).obj V).obj.right.as = PUnit.unit

full_name: TopCat.Presheaf.generateEquivalenceOpensLe
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ≌
    OpensLeCover U 
goal: (CategoryTheory.FullSubcategory fun f =>
    (CategoryTheory.Sieve.generate (TopCat.Presheaf.presieveOfCoveringAux U Y)).arrows f.hom) ≌
  TopCat.Presheaf.SheafCondition.OpensLeCover U

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_counitIso
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ≌
    OpensLeCover U 
goal: (TopCat.Presheaf.generateEquivalenceOpensLe U hY).counitIso = CategoryTheory.eqToIso ⋯

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_functor
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ≌
    OpensLeCover U 
goal: (TopCat.Presheaf.generateEquivalenceOpensLe U hY).functor = TopCat.Presheaf.generateEquivalenceOpensLe_functor' U ⋯

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_unitIso
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ≌
    OpensLeCover U 
goal: (TopCat.Presheaf.generateEquivalenceOpensLe U hY).unitIso = CategoryTheory.eqToIso ⋯

full_name: TopCat.Presheaf.generateEquivalenceOpensLe_inverse
code: /-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ≌
    OpensLeCover U 
goal: (TopCat.Presheaf.generateEquivalenceOpensLe U hY).inverse = TopCat.Presheaf.generateEquivalenceOpensLe_inverse' U ⋯

full_name: TopCat.Presheaf.whiskerIsoMapGenerateCocone_inv_hom
code: /-- Given a family of opens `opensLeCoverCocone U` is essentially the natural cocone
    associated to the sieve generated by the presieve associated to `U` with indexing
    category changed using the above equivalence. -/
@[simps]
def whiskerIsoMapGenerateCocone :
    (F.mapCone (opensLeCoverCocone U).op).whisker (generateEquivalenceOpensLe U hY).op.functor ≅
      F.mapCone (Sieve.generate (presieveOfCoveringAux U Y)).arrows.cocone.op 
goal: (F.whiskerIsoMapGenerateCocone U hY).inv.hom = F.map (CategoryTheory.eqToHom ⋯)

full_name: TopCat.Presheaf.whiskerIsoMapGenerateCocone
code: /-- Given a family of opens `opensLeCoverCocone U` is essentially the natural cocone
    associated to the sieve generated by the presieve associated to `U` with indexing
    category changed using the above equivalence. -/
@[simps]
def whiskerIsoMapGenerateCocone :
    (F.mapCone (opensLeCoverCocone U).op).whisker (generateEquivalenceOpensLe U hY).op.functor ≅
      F.mapCone (Sieve.generate (presieveOfCoveringAux U Y)).arrows.cocone.op 
goal: CategoryTheory.Limits.Cone.whisker (TopCat.Presheaf.generateEquivalenceOpensLe U hY).op.functor
    (CategoryTheory.Functor.mapCone F (TopCat.Presheaf.SheafCondition.opensLeCoverCocone U).op) ≅
  CategoryTheory.Functor.mapCone F
    (CategoryTheory.Sieve.generate (TopCat.Presheaf.presieveOfCoveringAux U Y)).arrows.cocone.op

full_name: TopCat.Presheaf.whiskerIsoMapGenerateCocone_hom_hom
code: /-- Given a family of opens `opensLeCoverCocone U` is essentially the natural cocone
    associated to the sieve generated by the presieve associated to `U` with indexing
    category changed using the above equivalence. -/
@[simps]
def whiskerIsoMapGenerateCocone :
    (F.mapCone (opensLeCoverCocone U).op).whisker (generateEquivalenceOpensLe U hY).op.functor ≅
      F.mapCone (Sieve.generate (presieveOfCoveringAux U Y)).arrows.cocone.op 
goal: (F.whiskerIsoMapGenerateCocone U hY).hom.hom = F.map (CategoryTheory.eqToHom ⋯)

full_name: TopCat.Presheaf.isLimitOpensLeEquivGenerate₁
code: /-- Given a presheaf `F` on the topological space `X` and a family of opens `U` of `X`,
    the natural cone associated to `F` and `U` used in the definition of
    `F.IsSheafOpensLeCover` is a limit cone iff the natural cone associated to `F`
    and the sieve generated by the presieve associated to `U` is a limit cone. -/
def isLimitOpensLeEquivGenerate₁ :
    IsLimit (F.mapCone (opensLeCoverCocone U).op) ≃
      IsLimit (F.mapCone (Sieve.generate (presieveOfCoveringAux U Y)).arrows.cocone.op) 
goal: CategoryTheory.Limits.IsLimit
    (CategoryTheory.Functor.mapCone F (TopCat.Presheaf.SheafCondition.opensLeCoverCocone U).op) ≃
  CategoryTheory.Limits.IsLimit
    (CategoryTheory.Functor.mapCone F
      (CategoryTheory.Sieve.generate (TopCat.Presheaf.presieveOfCoveringAux U Y)).arrows.cocone.op)

full_name: TopCat.Presheaf.isLimitOpensLeEquivGenerate₂
code: /-- Given a presheaf `F` on the topological space `X` and a presieve `R` whose generated sieve
    is covering for the associated Grothendieck topology (equivalently, the presieve is covering
    for the associated pretopology), the natural cone associated to `F` and the family of opens
    associated to `R` is a limit cone iff the natural cone associated to `F` and the generated
    sieve is a limit cone.
    Since only the existence of a 1-1 correspondence will be used, the exact definition does
    not matter, so tactics are used liberally. -/
def isLimitOpensLeEquivGenerate₂ (R : Presieve Y)
    (hR : Sieve.generate R ∈ Opens.grothendieckTopology X Y) :
    IsLimit (F.mapCone (opensLeCoverCocone (coveringOfPresieve Y R)).op) ≃
      IsLimit (F.mapCone (Sieve.generate R).arrows.cocone.op) 
goal: CategoryTheory.Limits.IsLimit
    (CategoryTheory.Functor.mapCone F
      (TopCat.Presheaf.SheafCondition.opensLeCoverCocone (TopCat.Presheaf.coveringOfPresieve Y R)).op) ≃
  CategoryTheory.Limits.IsLimit (CategoryTheory.Functor.mapCone F (CategoryTheory.Sieve.generate R).arrows.cocone.op)

full_name: TopCat.Presheaf.isSheaf_iff_isSheafOpensLeCover
code: /-- A presheaf `(opens X)ᵒᵖ ⥤ C` on a topological space `X` is a sheaf on the site `opens X` iff
    it satisfies the `IsSheafOpensLeCover` sheaf condition. The latter is not the
    official definition of sheaves on spaces, but has the advantage that it does not
    require `has_products C`. -/
theorem isSheaf_iff_isSheafOpensLeCover : F.IsSheaf ↔ F.IsSheafOpensLeCover 
goal: F.IsSheaf ↔ F.IsSheafOpensLeCover