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.instInhabitedCat = { default := CategoryTheory.Bundled.mk (Type u) }
Equations
- CategoryTheory.Cat.instCoeSortCatType = { coe := CategoryTheory.Bundled.α }
Equations
- CategoryTheory.Cat.str C = C.str
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]
theorem
CategoryTheory.Cat.id_map
{C : CategoryTheory.Cat}
{X : ↑C}
{Y : ↑C}
(f : X ⟶ Y)
:
(CategoryTheory.CategoryStruct.id C).toPrefunctor.map f = f
@[simp]
theorem
CategoryTheory.Cat.comp_obj
{C : CategoryTheory.Cat}
{D : CategoryTheory.Cat}
{E : CategoryTheory.Cat}
(F : C ⟶ D)
(G : D ⟶ E)
(X : ↑C)
:
(CategoryTheory.CategoryStruct.comp F G).toPrefunctor.obj X = G.toPrefunctor.obj (F.toPrefunctor.obj X)
@[simp]
theorem
CategoryTheory.Cat.comp_map
{C : CategoryTheory.Cat}
{D : CategoryTheory.Cat}
{E : CategoryTheory.Cat}
(F : C ⟶ D)
(G : D ⟶ E)
{X : ↑C}
{Y : ↑C}
(f : X ⟶ Y)
:
(CategoryTheory.CategoryStruct.comp F G).toPrefunctor.map f = G.toPrefunctor.map (F.toPrefunctor.map f)
Functor that gets the set of objects of a category. It is not
called forget
, because it is not a faithful functor.
Equations
- CategoryTheory.Cat.objects = CategoryTheory.Functor.mk { obj := fun (C : CategoryTheory.Cat) => ↑C, map := fun {X Y : CategoryTheory.Cat} (F : X ⟶ Y) => F.obj }
Instances For
def
CategoryTheory.Cat.equivOfIso
{C : CategoryTheory.Cat}
{D : CategoryTheory.Cat}
(γ : C ≅ D)
:
↑C ≌ ↑D
Any isomorphism in Cat
induces an equivalence of the underlying categories.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem
CategoryTheory.typeToCat_map
{X : Type u}
{Y : Type u}
(f : X ⟶ Y)
:
CategoryTheory.typeToCat.toPrefunctor.map f = id (CategoryTheory.Discrete.functor (CategoryTheory.Discrete.mk ∘ f))
@[simp]
theorem
CategoryTheory.typeToCat_obj
(X : Type u)
:
CategoryTheory.typeToCat.toPrefunctor.obj X = CategoryTheory.Cat.of (CategoryTheory.Discrete X)
Embedding Type
into Cat
as discrete categories.
This ought to be modelled as a 2-functor!
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.