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
      structure CategoryTheory.Cat.Hom (C D : Cat) :
      Type (max u v)

      The type of 1-morphisms in the bicategory of categories Cat. This is a structure around Functor to prevent defeq-abuse

      • ofFunctor :: (
        • toFunctor : Functor C D

          The Functor underlying a 1-morphism in Cat

      • )
      Instances For
        theorem CategoryTheory.Cat.Hom.ext {C D : Cat} {x y : C.Hom D} (toFunctor : x.toFunctor = y.toFunctor) :
        x = y
        theorem CategoryTheory.Cat.Hom.ext_iff {C D : Cat} {x y : C.Hom D} :

        The 1-morphism in Cat corresponding to a functor.

        Equations
        Instances For
          theorem CategoryTheory.Cat.ext {C D : Cat} {F G : C D} (h : F.toFunctor = G.toFunctor) :
          F = G
          theorem CategoryTheory.Cat.ext_iff {C D : Cat} {F G : C D} :

          The equivalence between the type of functors between two categories and the type of 1-morphisms in Cat between the objects corresponding to those categories.

          Equations
          Instances For

            The equivalence between the type of 1-morphisms in Cat between two objects and the type of functors between the categories corresponding to those objects.

            Equations
            Instances For
              @[simp]
              theorem CategoryTheory.Cat.Hom.equivFunctor_apply (C D : Cat) (a✝ : of C of D) :
              (equivFunctor C D) a✝ = a✝.toFunctor
              @[simp]
              theorem CategoryTheory.Cat.Hom.equivFunctor_symm_apply (C D : Cat) (a✝ : Functor C D) :
              (equivFunctor C D).symm a✝ = a✝.toCatHom
              structure CategoryTheory.Cat.Hom₂ {C D : Cat} (F G : C D) :
              Type (max u v)

              The type of 2-morphisms in the bicategory of categories Cat. This is a wrapper around NatTrans to prevent defeq-abuse.

              Instances For

                The 2-morphism in Cat corresponding to a natural transformation between functors.

                Equations
                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  @[simp]
                  theorem CategoryTheory.NatTrans.toCatHom₂_comp {C D : Type u} [Category.{v, u} C] [Category.{v, u} D] {F G H : Functor C D} (η₁ : F G) (η₂ : G H) :
                  @[simp]
                  theorem CategoryTheory.Cat.Hom.toNatTrans_comp {C D : Cat} {F G H : C D} (η₁ : F G) (η₂ : G H) :
                  theorem CategoryTheory.Cat.Hom₂.ext {C D : Cat} {F G : C D} {η₁ η₂ : F G} (h : η₁.toNatTrans = η₂.toNatTrans) :
                  η₁ = η₂
                  theorem CategoryTheory.Cat.Hom₂.ext_iff {C D : Cat} {F G : C D} {η₁ η₂ : F G} :
                  η₁ = η₂ η₁.toNatTrans = η₂.toNatTrans

                  The 2-iso in Cat corresponding to a natural isomorphism.

                  Equations
                  Instances For
                    def CategoryTheory.Cat.Hom.toNatIso {X Y : Cat} {F G : X Y} (e : F G) :

                    The natural isomorphism corresponding to a 2-iso in Cat

                    Equations
                    Instances For
                      @[simp]
                      theorem CategoryTheory.Cat.Hom.toNatIso_hom {X Y : Cat} {F G : X Y} (e : F G) :
                      @[simp]
                      theorem CategoryTheory.Cat.Hom.toNatIso_inv {X Y : Cat} {F G : X Y} (e : F G) :
                      @[simp]
                      theorem CategoryTheory.Cat.Hom.isoMk_toNatIso {X Y : Cat} {F G : X Y} (e : F G) :
                      @[simp]

                      Bicategory structure on Cat

                      Equations
                      • One or more equations did not get rendered due to their size.
                      @[simp]
                      @[simp]
                      theorem CategoryTheory.Cat.Hom.id_map {C : Cat} {X Y : C} (f : X Y) :
                      @[simp]
                      theorem CategoryTheory.Cat.Hom.comp_obj {C D E : Cat} (F : C D) (G : D E) (X : C) :
                      @[simp]
                      theorem CategoryTheory.Cat.Hom.comp_map {C D E : Cat} (F : C D) (G : D E) {X Y : C} (f : X Y) :
                      @[simp]
                      theorem CategoryTheory.Cat.Hom₂.comp_app {C D : Cat} {F G H : C D} (α : F G) (β : G H) (X : C) :
                      theorem CategoryTheory.Cat.Hom₂.comp_app_assoc {C D : Cat} {F G H : C D} (α : F G) (β : G H) (X : C) {Z : D} (h : H.toFunctor.obj X Z) :
                      @[simp]
                      theorem CategoryTheory.Cat.Hom₂.eqToHom_toNatTrans {C D : Cat} {F G : C D} (h : F = G) :
                      theorem CategoryTheory.Cat.eqToHom_app {C D : Cat} (F G : C D) (h : F = G) (X : C) :
                      @[simp]
                      @[simp]
                      theorem CategoryTheory.Cat.whiskerLeft_app {C D E : Cat} (F : C D) {G H : D E} (η : G H) (X : C) :
                      @[simp]
                      theorem CategoryTheory.Cat.whiskerRight_app {C D E : Cat} {F G : C D} (H : D E) (η : F G) (X : C) :
                      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.

                      Composition in the category of categories equals functor composition.

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

                      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
                        def CategoryTheory.Cat.equivOfIso {C D : 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
                          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_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.toCatHom
                            @[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.toCatHom

                            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
                              @[simp]
                              theorem CategoryTheory.typeToCat_map {X✝ Y✝ : Type u} (f : X✝ Y✝) :