Category of categories #
This file contains the definition of the category Cat
of all categories.
In this category objects are categories and
morphisms are functors between these categories.
Implementation notes #
Though Cat
is not a concrete category, we use bundled
to define
its carrier type.
Category of categories.
Instances For
Equations
- CategoryTheory.Cat.instInhabited = { default := { α := Type ?u.3, str := CategoryTheory.types } }
Equations
Bicategory structure on Cat
Equations
- One or more equations did not get rendered due to their size.
Cat
is a strict bicategory.
Category structure on Cat
@[simp]
@[simp]
theorem
CategoryTheory.Cat.comp_obj
{C D E : Cat}
(F : C ⟶ D)
(G : D ⟶ E)
(X : ↑C)
:
(CategoryStruct.comp F G).obj X = G.obj (F.obj X)
@[simp]
theorem
CategoryTheory.Cat.comp_map
{C D E : Cat}
(F : C ⟶ D)
(G : D ⟶ E)
{X Y : ↑C}
(f : X ⟶ Y)
:
(CategoryStruct.comp F G).map f = G.map (F.map f)
@[simp]
theorem
CategoryTheory.Cat.id_app
{C D : Cat}
(F : C ⟶ D)
(X : ↑C)
:
(CategoryStruct.id F).app X = CategoryStruct.id (F.obj X)
@[simp]
theorem
CategoryTheory.Cat.comp_app
{C D : Cat}
{F G H : C ⟶ D}
(α : F ⟶ G)
(β : G ⟶ H)
(X : ↑C)
:
(CategoryStruct.comp α β).app X = CategoryStruct.comp (α.app X) (β.app X)
@[simp]
theorem
CategoryTheory.Cat.whiskerLeft_app
{C D E : Cat}
(F : C ⟶ D)
{G H : D ⟶ E}
(η : G ⟶ H)
(X : ↑C)
:
(Bicategory.whiskerLeft F η).app X = η.app (F.obj X)
@[simp]
theorem
CategoryTheory.Cat.whiskerRight_app
{C D E : Cat}
{F G : C ⟶ D}
(H : D ⟶ E)
(η : F ⟶ G)
(X : ↑C)
:
(Bicategory.whiskerRight η H).app X = H.map (η.app X)
theorem
CategoryTheory.Cat.leftUnitor_hom_app
{B C : Cat}
(F : B ⟶ C)
(X : ↑B)
:
(Bicategory.leftUnitor F).hom.app X = eqToHom ⋯
theorem
CategoryTheory.Cat.leftUnitor_inv_app
{B C : Cat}
(F : B ⟶ C)
(X : ↑B)
:
(Bicategory.leftUnitor F).inv.app X = eqToHom ⋯
theorem
CategoryTheory.Cat.rightUnitor_hom_app
{B C : Cat}
(F : B ⟶ C)
(X : ↑B)
:
(Bicategory.rightUnitor F).hom.app X = eqToHom ⋯
theorem
CategoryTheory.Cat.rightUnitor_inv_app
{B C : Cat}
(F : B ⟶ C)
(X : ↑B)
:
(Bicategory.rightUnitor F).inv.app X = eqToHom ⋯
theorem
CategoryTheory.Cat.associator_hom_app
{B C D E : Cat}
(F : B ⟶ C)
(G : C ⟶ D)
(H : D ⟶ E)
(X : ↑B)
:
(Bicategory.associator F G H).hom.app X = eqToHom ⋯
theorem
CategoryTheory.Cat.associator_inv_app
{B C D E : Cat}
(F : B ⟶ C)
(G : C ⟶ D)
(H : D ⟶ E)
(X : ↑B)
:
(Bicategory.associator F G H).inv.app X = eqToHom ⋯
The identity in the category of categories equals the identity functor.
theorem
CategoryTheory.Cat.comp_eq_comp
{X Y Z : Cat}
(F : X ⟶ Y)
(G : Y ⟶ Z)
:
CategoryStruct.comp F G = Functor.comp F G
Composition in the category of categories equals functor composition.
Functor that gets the set of objects of a category. It is not
called forget
, because it is not a faithful functor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- X.instCategoryObjObjects = inferInstance
Any isomorphism in Cat
induces an equivalence of the underlying categories.
Equations
- CategoryTheory.Cat.equivOfIso γ = { functor := γ.hom, inverse := γ.inv, unitIso := CategoryTheory.eqToIso ⋯, counitIso := CategoryTheory.eqToIso ⋯, functor_unitIso_comp := ⋯ }
Instances For
@[simp]
theorem
CategoryTheory.typeToCat_map
{X Y : Type u}
(f : X ⟶ Y)
:
typeToCat.map f = id (Discrete.functor (Discrete.mk ∘ f))