File: Mathlib/CategoryTheory/Sites/Types.lean

full_name: CategoryTheory.typesGrothendieckTopology
code: /-- A Grothendieck topology associated to the category of all types.
A sieve is a covering iff it is jointly surjective. -/
def typesGrothendieckTopology : GrothendieckTopology (Type u) 
goal: CategoryTheory.GrothendieckTopology (Type u)

full_name: CategoryTheory.discreteSieve
code: /-- The discrete sieve on a type, which only includes arrows whose image is a subsingleton. -/
@[simps]
def discreteSieve (α : Type u) : Sieve α 
goal: CategoryTheory.Sieve α

full_name: CategoryTheory.discreteSieve_apply
code: /-- The discrete sieve on a type, which only includes arrows whose image is a subsingleton. -/
@[simps]
def discreteSieve (α : Type u) : Sieve α 
goal: ∀ (x : Type u) (f : x ⟶ α), (CategoryTheory.discreteSieve α).arrows f = ∃ x_1, ∀ (y : x), f y = x_1

full_name: CategoryTheory.discreteSieve_mem
code: theorem discreteSieve_mem (α : Type u) : discreteSieve α ∈ typesGrothendieckTopology α 
goal: CategoryTheory.discreteSieve α ∈ CategoryTheory.typesGrothendieckTopology.sieves α

full_name: CategoryTheory.discretePresieve
code: /-- The discrete presieve on a type, which only includes arrows whose domain is a singleton. -/
def discretePresieve (α : Type u) : Presieve α 
goal: CategoryTheory.Presieve α

full_name: CategoryTheory.generate_discretePresieve_mem
code: theorem generate_discretePresieve_mem (α : Type u) :
    Sieve.generate (discretePresieve α) ∈ typesGrothendieckTopology α 
goal: CategoryTheory.Sieve.generate (CategoryTheory.discretePresieve α) ∈ CategoryTheory.typesGrothendieckTopology.sieves α

full_name: CategoryTheory.isSheaf_yoneda'
code: theorem isSheaf_yoneda' {α : Type u} : IsSheaf typesGrothendieckTopology (yoneda.obj α) 
goal: CategoryTheory.Presieve.IsSheaf CategoryTheory.typesGrothendieckTopology (CategoryTheory.yoneda.obj α)

full_name: CategoryTheory.yoneda'_map_val
code: /-- The yoneda functor that sends a type to a sheaf over the category of types. -/
@[simps]
def yoneda' : Type u ⥤ SheafOfTypes typesGrothendieckTopology 
goal: ∀ {X Y : Type u} (f : X ⟶ Y), (CategoryTheory.yoneda'.map f).val = CategoryTheory.yoneda.map f

full_name: CategoryTheory.yoneda'_obj_val
code: /-- The yoneda functor that sends a type to a sheaf over the category of types. -/
@[simps]
def yoneda' : Type u ⥤ SheafOfTypes typesGrothendieckTopology 
goal: (CategoryTheory.yoneda'.obj α).val = CategoryTheory.yoneda.obj α

full_name: CategoryTheory.yoneda'
code: /-- The yoneda functor that sends a type to a sheaf over the category of types. -/
@[simps]
def yoneda' : Type u ⥤ SheafOfTypes typesGrothendieckTopology 
goal: CategoryTheory.Functor (Type u) (CategoryTheory.SheafOfTypes CategoryTheory.typesGrothendieckTopology)

full_name: CategoryTheory.yoneda'_comp
code: @[simp]
theorem yoneda'_comp : yoneda'.{u} ⋙ sheafOfTypesToPresheaf _ = yoneda 
goal: CategoryTheory.yoneda'.comp (CategoryTheory.sheafOfTypesToPresheaf CategoryTheory.typesGrothendieckTopology) =
  CategoryTheory.yoneda

full_name: CategoryTheory.eval
code: /-- Given a presheaf `P` on the category of types, construct
a map `P(α) → (α → P(*))` for all type `α`. -/
def eval (P : Type uᵒᵖ ⥤ Type u) (α : Type u) (s : P.obj (op α)) (x : α) : P.obj (op PUnit) 
goal: P.obj (Opposite.op PUnit.{u + 1})

full_name: CategoryTheory.typesGlue
code: /-- Given a sheaf `S` on the category of types, construct a map
`(α → S(*)) → S(α)` that is inverse to `eval`. -/
noncomputable def typesGlue (S : Type uᵒᵖ ⥤ Type u) (hs : IsSheaf typesGrothendieckTopology S)
    (α : Type u) (f : α → S.obj (op PUnit)) : S.obj (op α) 
goal: S.obj (Opposite.op α)

full_name: CategoryTheory.eval_typesGlue
code: theorem eval_typesGlue {S hs α} (f) : eval.{u} S α (typesGlue S hs α f) = f 
goal: CategoryTheory.eval S α (CategoryTheory.typesGlue S hs α f) = f

full_name: CategoryTheory.typesGlue_eval
code: theorem typesGlue_eval {S hs α} (s) : typesGlue.{u} S hs α (eval S α s) = s 
goal: CategoryTheory.typesGlue S hs α (CategoryTheory.eval S α s) = s

full_name: CategoryTheory.evalEquiv_apply
code: /-- Given a sheaf `S`, construct an equivalence `S(α) ≃ (α → S(*))`. -/
@[simps]
noncomputable def evalEquiv (S : Type uᵒᵖ ⥤ Type u) (hs : IsSheaf typesGrothendieckTopology S)
    (α : Type u) : S.obj (op α) ≃ (α → S.obj (op PUnit)) 
goal: (CategoryTheory.evalEquiv S hs α) s x = CategoryTheory.eval S α s x

full_name: CategoryTheory.evalEquiv
code: /-- Given a sheaf `S`, construct an equivalence `S(α) ≃ (α → S(*))`. -/
@[simps]
noncomputable def evalEquiv (S : Type uᵒᵖ ⥤ Type u) (hs : IsSheaf typesGrothendieckTopology S)
    (α : Type u) : S.obj (op α) ≃ (α → S.obj (op PUnit)) 
goal: S.obj (Opposite.op α) ≃ (α → S.obj (Opposite.op PUnit.{u + 1}))

full_name: CategoryTheory.evalEquiv_symm_apply
code: /-- Given a sheaf `S`, construct an equivalence `S(α) ≃ (α → S(*))`. -/
@[simps]
noncomputable def evalEquiv (S : Type uᵒᵖ ⥤ Type u) (hs : IsSheaf typesGrothendieckTopology S)
    (α : Type u) : S.obj (op α) ≃ (α → S.obj (op PUnit)) 
goal: (CategoryTheory.evalEquiv S hs α).symm f = CategoryTheory.typesGlue S hs α f

full_name: CategoryTheory.eval_map
code: theorem eval_map (S : Type uᵒᵖ ⥤ Type u) (α β) (f : β ⟶ α) (s x) :
    eval S β (S.map f.op s) x = eval S α s (f x) 
goal: CategoryTheory.eval S β (S.map f.op s) x = CategoryTheory.eval S α s (f x)

full_name: CategoryTheory.equivYoneda_hom_app
code: /-- Given a sheaf `S`, construct an isomorphism `S ≅ [-, S(*)]`. -/
@[simps!]
noncomputable def equivYoneda (S : Type uᵒᵖ ⥤ Type u) (hs : IsSheaf typesGrothendieckTopology S) :
    S ≅ yoneda.obj (S.obj (op PUnit)) 
goal: ∀ (a : S.obj X), (CategoryTheory.equivYoneda S hs).hom.app X a = (CategoryTheory.evalEquiv S hs (Opposite.unop X)) a

full_name: CategoryTheory.equivYoneda_inv_app
code: /-- Given a sheaf `S`, construct an isomorphism `S ≅ [-, S(*)]`. -/
@[simps!]
noncomputable def equivYoneda (S : Type uᵒᵖ ⥤ Type u) (hs : IsSheaf typesGrothendieckTopology S) :
    S ≅ yoneda.obj (S.obj (op PUnit)) 
goal: ∀ (a : (CategoryTheory.yoneda.obj (S.obj (Opposite.op PUnit.{u + 1}))).obj X),
  (CategoryTheory.equivYoneda S hs).inv.app X a = (CategoryTheory.evalEquiv S hs (Opposite.unop X)).symm a

full_name: CategoryTheory.equivYoneda
code: /-- Given a sheaf `S`, construct an isomorphism `S ≅ [-, S(*)]`. -/
@[simps!]
noncomputable def equivYoneda (S : Type uᵒᵖ ⥤ Type u) (hs : IsSheaf typesGrothendieckTopology S) :
    S ≅ yoneda.obj (S.obj (op PUnit)) 
goal: S ≅ CategoryTheory.yoneda.obj (S.obj (Opposite.op PUnit.{u + 1}))

full_name: CategoryTheory.equivYoneda'
code: /-- Given a sheaf `S`, construct an isomorphism `S ≅ [-, S(*)]`. -/
@[simps]
noncomputable def equivYoneda' (S : SheafOfTypes typesGrothendieckTopology) :
    S ≅ yoneda'.obj (S.1.obj (op PUnit)) 
goal: S ≅ CategoryTheory.yoneda'.obj (S.val.obj (Opposite.op PUnit.{u_1 + 1}))

full_name: CategoryTheory.equivYoneda'_hom_val
code: /-- Given a sheaf `S`, construct an isomorphism `S ≅ [-, S(*)]`. -/
@[simps]
noncomputable def equivYoneda' (S : SheafOfTypes typesGrothendieckTopology) :
    S ≅ yoneda'.obj (S.1.obj (op PUnit)) 
goal: (CategoryTheory.equivYoneda' S).hom.val = (CategoryTheory.equivYoneda S.val ⋯).hom

full_name: CategoryTheory.equivYoneda'_inv_val
code: /-- Given a sheaf `S`, construct an isomorphism `S ≅ [-, S(*)]`. -/
@[simps]
noncomputable def equivYoneda' (S : SheafOfTypes typesGrothendieckTopology) :
    S ≅ yoneda'.obj (S.1.obj (op PUnit)) 
goal: (CategoryTheory.equivYoneda' S).inv.val = (CategoryTheory.equivYoneda S.val ⋯).inv

full_name: CategoryTheory.eval_app
code: theorem eval_app (S₁ S₂ : SheafOfTypes.{u} typesGrothendieckTopology) (f : S₁ ⟶ S₂) (α : Type u)
    (s : S₁.1.obj (op α)) (x : α) :
    eval S₂.1 α (f.val.app (op α) s) x = f.val.app (op PUnit) (eval S₁.1 α s x) 
goal: CategoryTheory.eval S₂.val α (f.val.app (Opposite.op α) s) x =
  f.val.app (Opposite.op PUnit.{u + 1}) (CategoryTheory.eval S₁.val α s x)

full_name: CategoryTheory.typeEquiv_functor_map_val_app
code: /-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology 
goal: ∀ {X Y : Type u} (f : X ⟶ Y) (Y_1 : Type uᵒᵖ)
  (g :
    ((fun X =>
            { obj := fun Y => Opposite.unop Y ⟶ X,
              map := fun {X_1 Y} f g => CategoryTheory.CategoryStruct.comp f.unop g, map_id := ⋯, map_comp := ⋯ })
          X).obj
      Y_1)
  (a : Opposite.unop Y_1), (CategoryTheory.typeEquiv.functor.map f).val.app Y_1 g a = f (g a)

full_name: CategoryTheory.typeEquiv_functor_obj_val_obj
code: /-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology 
goal: (CategoryTheory.typeEquiv.functor.obj α).val.obj Y = (Opposite.unop Y ⟶ α)

full_name: CategoryTheory.typeEquiv_unitIso_hom_app
code: /-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology 
goal: ∀ (a : (CategoryTheory.Functor.id (Type u)).obj X),
  CategoryTheory.typeEquiv.unitIso.hom.app X a =
    CategoryTheory.CategoryStruct.comp
      ((CategoryTheory.evalEquiv (CategoryTheory.yoneda.obj X) ⋯ PUnit.{u + 1}) fun x => a) fun f => f PUnit.unit

full_name: CategoryTheory.typeEquiv_unitIso_inv_app
code: /-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology 
goal: ∀
  (a :
    (CategoryTheory.yoneda'.comp
          ((CategoryTheory.sheafOfTypesToPresheaf CategoryTheory.typesGrothendieckTopology).comp
            ((CategoryTheory.evaluation Type uᵒᵖ (Type u)).obj (Opposite.op PUnit.{u + 1})))).obj
      X),
  CategoryTheory.typeEquiv.unitIso.inv.app X a =
    (CategoryTheory.evalEquiv (CategoryTheory.yoneda.obj X) ⋯ PUnit.{u + 1}).symm
      (CategoryTheory.CategoryStruct.comp a fun x x_1 => x) PUnit.unit

full_name: CategoryTheory.typeEquiv_inverse_map
code: /-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology 
goal: ∀ {X Y : CategoryTheory.SheafOfTypes CategoryTheory.typesGrothendieckTopology} (f : X ⟶ Y)
  (a :
    ((CategoryTheory.evaluation Type uᵒᵖ (Type u)).obj (Opposite.op PUnit.{u + 1})).obj
      ((CategoryTheory.sheafOfTypesToPresheaf CategoryTheory.typesGrothendieckTopology).obj X)),
  CategoryTheory.typeEquiv.inverse.map f a = f.val.app (Opposite.op PUnit.{u + 1}) a

full_name: CategoryTheory.typeEquiv
code: /-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology 
goal: Type u ≌ CategoryTheory.SheafOfTypes CategoryTheory.typesGrothendieckTopology

full_name: CategoryTheory.typeEquiv_counitIso_inv_app_val_app
code: /-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology 
goal: ∀ (X_1 : Type uᵒᵖ) (a : X.val.obj X_1),
  (CategoryTheory.typeEquiv.counitIso.inv.app X).val.app X_1 a =
    (CategoryTheory.evalEquiv X.val ⋯ (Opposite.unop X_1)) a

full_name: CategoryTheory.typeEquiv_counitIso_hom_app_val_app
code: /-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology 
goal: ∀ (X_1 : Type uᵒᵖ) (a : (CategoryTheory.yoneda.obj (X.val.obj (Opposite.op PUnit.{u + 1}))).obj X_1),
  (CategoryTheory.typeEquiv.counitIso.hom.app X).val.app X_1 a =
    (CategoryTheory.evalEquiv X.val ⋯ (Opposite.unop X_1)).symm a

full_name: CategoryTheory.typeEquiv_functor_obj_val_map
code: /-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology 
goal: ∀ {X Y : Type uᵒᵖ} (f : X ⟶ Y) (g : Opposite.unop X ⟶ α) (a : Opposite.unop Y),
  (CategoryTheory.typeEquiv.functor.obj α).val.map f g a = g (f.unop a)

full_name: CategoryTheory.typeEquiv_inverse_obj
code: /-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology 
goal: CategoryTheory.typeEquiv.inverse.obj X = X.val.obj (Opposite.op PUnit.{u + 1})

full_name: CategoryTheory.subcanonical_typesGrothendieckTopology
code: theorem subcanonical_typesGrothendieckTopology : Sheaf.Subcanonical typesGrothendieckTopology.{u} 
goal: CategoryTheory.Sheaf.Subcanonical CategoryTheory.typesGrothendieckTopology

full_name: CategoryTheory.typesGrothendieckTopology_eq_canonical
code: theorem typesGrothendieckTopology_eq_canonical :
    typesGrothendieckTopology.{u} = Sheaf.canonicalTopology (Type u) 
goal: CategoryTheory.typesGrothendieckTopology = CategoryTheory.Sheaf.canonicalTopology (Type u)