Documentation

Mathlib.CategoryTheory.Category.Cat

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.

def CategoryTheory.Cat :
Type (max (u + 1) u (v + 1))

Category of categories.

Equations
    Instances For
      Equations

        Construct a bundled Cat from the underlying type and the typeclass.

        Equations
          Instances For

            Bicategory structure on Cat

            Equations

              Category structure on Cat

              Equations
                theorem CategoryTheory.Cat.ext {C D : Cat} {F G : C D} {α β : F G} (w : α.app = β.app) :
                α = β
                theorem CategoryTheory.Cat.ext_iff {C D : Cat} {F G : C D} {α β : F G} :
                α = β α.app = β.app
                @[simp]
                theorem CategoryTheory.Cat.id_obj {C : Cat} (X : C) :
                @[simp]
                theorem CategoryTheory.Cat.id_map {C : Cat} {X Y : C} (f : X Y) :
                @[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) :
                @[simp]
                theorem CategoryTheory.Cat.comp_app {C D : Cat} {F G H : C D} (α : F G) (β : G H) (X : C) :
                @[simp]
                theorem CategoryTheory.Cat.eqToHom_app {C D : Cat} (F G : C D) (h : F = G) (X : C) :
                (eqToHom h).app X = eqToHom
                @[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.associator_hom_app {B C D E : Cat} (F : B C) (G : C D) (H : D E) (X : B) :
                theorem CategoryTheory.Cat.associator_inv_app {B C D E : Cat} (F : B C) (G : C D) (H : D E) (X : B) :

                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) :

                Composition in the category of categories equals functor composition.

                @[simp]
                theorem CategoryTheory.Cat.of_α (C : Type u_1) [Category.{u_2, u_1} C] :
                (of C) = C
                @[simp]
                theorem CategoryTheory.Cat.coe_of (C : Cat) :
                of C = C

                Functors between categories of the same size define arrows in Cat.

                Equations
                  Instances For

                    Arrows in Cat define functors.

                    Equations
                      Instances For

                        Functor that gets the set of objects of a category. It is not called forget, because it is not a faithful functor.

                        Equations
                          Instances For
                            def CategoryTheory.Cat.equivOfIso {C D : Cat} (γ : C D) :
                            C D

                            Any isomorphism in Cat induces an equivalence of the underlying categories.

                            Equations
                              Instances For
                                def CategoryTheory.Cat.isoOfEquiv {C D : Cat} (e : C D) (h₁ : ∀ (X : C), e.inverse.obj (e.functor.obj X) = X) (h₂ : ∀ (Y : D), e.functor.obj (e.inverse.obj Y) = Y) (h₃ : ∀ (X : C), e.unitIso.hom.app X = eqToHom := by cat_disch) (h₄ : ∀ (Y : D), e.counitIso.hom.app Y = eqToHom := by cat_disch) :
                                C D

                                Under certain hypotheses, an equivalence of categories actually defines an isomorphism in Cat.

                                Equations
                                  Instances For
                                    @[simp]
                                    theorem CategoryTheory.Cat.isoOfEquiv_inv {C D : Cat} (e : C D) (h₁ : ∀ (X : C), e.inverse.obj (e.functor.obj X) = X) (h₂ : ∀ (Y : D), e.functor.obj (e.inverse.obj Y) = Y) (h₃ : ∀ (X : C), e.unitIso.hom.app X = eqToHom := by cat_disch) (h₄ : ∀ (Y : D), e.counitIso.hom.app Y = eqToHom := by cat_disch) :
                                    (isoOfEquiv e h₁ h₂ h₃ h₄).inv = e.inverse
                                    @[simp]
                                    theorem CategoryTheory.Cat.isoOfEquiv_hom {C D : Cat} (e : C D) (h₁ : ∀ (X : C), e.inverse.obj (e.functor.obj X) = X) (h₂ : ∀ (Y : D), e.functor.obj (e.inverse.obj Y) = Y) (h₃ : ∀ (X : C), e.unitIso.hom.app X = eqToHom := by cat_disch) (h₄ : ∀ (Y : D), e.counitIso.hom.app Y = eqToHom := by cat_disch) :
                                    (isoOfEquiv e h₁ h₂ h₃ h₄).hom = e.functor

                                    Embedding Type into Cat as discrete categories.

                                    This ought to be modelled as a 2-functor!

                                    Equations
                                      Instances For
                                        @[simp]
                                        theorem CategoryTheory.typeToCat_map {X✝ Y✝ : Type u} (f : X✝ Y✝) :