Documentation

Mathlib.CategoryTheory.Bicategory.Functor

Oplax functors and pseudofunctors #

An oplax functor F between bicategories B and C consists of

A pseudofunctor is an oplax functor whose mapId and mapComp are isomorphisms. We provide several constructors for pseudofunctors:

The additional constructors are useful when constructing a pseudofunctor where the construction of the oplax functor associated with it is already done. For example, the composition of pseudofunctors can be defined by using the composition of oplax functors as follows:

def comp (F : Pseudofunctor B C) (G : Pseudofunctor C D) : Pseudofunctor B D :=
  mkOfOplax ((F : OplaxFunctor B C).comp G)
  { mapIdIso := λ a => (G.mapFunctor _ _).mapIso (F.mapId a) ≪≫ G.mapId (F.obj a),
    mapCompIso := λ f g =>
      (G.mapFunctor _ _).mapIso (F.mapComp f g) ≪≫ G.mapComp (F.map f) (F.map g) }

although the composition of pseudofunctors in this file is defined by using the default constructor because obviously wasn't smart enough in mathlib3 and the porter of this file was too lazy to investigate this issue further in mathlib4. Similarly, the composition is also defined by using mkOfOplax' after giving appropriate instances for IsIso. The former constructor mkOfOplax requires isomorphisms as data type Iso, and so it is useful if you don't want to forget the definitions of the inverses. On the other hand, the latter constructor mkOfOplax' is useful if you want to use propositional type class IsIso.

Main definitions #

Future work #

There are two types of functors between bicategories, called lax and oplax functors, depending on the directions of mapId and mapComp. We may need both in mathlib in the future, but for now we only define oplax functors.

structure CategoryTheory.PrelaxFunctor (B : Type u₁) [Quiver B] [(a b : B) → Quiver (a b)] (C : Type u₂) [Quiver C] [(a b : C) → Quiver (a b)] extends Prefunctor :
Type (max (max (max (max (max u₁ u₂) v₁) v₂) w₁) w₂)
  • obj : BC
  • map : {X Y : B} → (X Y) → ((s).obj X (s).obj Y)
  • map₂ : {a b : B} → {f g : a b} → (f g) → ((s).map f (s).map g)

    The action of a prelax functor on 2-morphisms.

A prelax functor between bicategories consists of functions between objects, 1-morphisms, and 2-morphisms. This structure will be extended to define OplaxFunctor.

Instances For
    instance CategoryTheory.PrelaxFunctor.hasCoeToPrefunctor {B : Type u₁} [Quiver B] [(a b : B) → Quiver (a b)] {C : Type u₂} [Quiver C] [(a b : C) → Quiver (a b)] :
    @[simp]
    theorem CategoryTheory.PrelaxFunctor.id_toPrefunctor_map (B : Type u₁) [Quiver B] [(a b : B) → Quiver (a b)] :
    ∀ {X Y : B} (a : X Y), (↑(CategoryTheory.PrelaxFunctor.id B)).map a = (𝟭q B).map a
    @[simp]
    theorem CategoryTheory.PrelaxFunctor.id_map₂ (B : Type u₁) [Quiver B] [(a b : B) → Quiver (a b)] :
    ∀ {a b : B} {f g : a b} (η : f g), CategoryTheory.PrelaxFunctor.map₂ (CategoryTheory.PrelaxFunctor.id B) η = η
    @[simp]
    theorem CategoryTheory.PrelaxFunctor.id_toPrefunctor_obj (B : Type u₁) [Quiver B] [(a b : B) → Quiver (a b)] :
    ∀ (a : B), (↑(CategoryTheory.PrelaxFunctor.id B)).obj a = (𝟭q B).obj a

    The identity prelax functor.

    Instances For
      @[simp]
      theorem CategoryTheory.PrelaxFunctor.comp_toPrefunctor_map {B : Type u₁} [Quiver B] [(a b : B) → Quiver (a b)] {C : Type u₂} [Quiver C] [(a b : C) → Quiver (a b)] {D : Type u₃} [Quiver D] [(a b : D) → Quiver (a b)] (F : CategoryTheory.PrelaxFunctor B C) (G : CategoryTheory.PrelaxFunctor C D) :
      ∀ {X Y : B} (a : X Y), (↑(CategoryTheory.PrelaxFunctor.comp F G)).map a = (F ⋙q G).map a
      @[simp]
      theorem CategoryTheory.PrelaxFunctor.comp_toPrefunctor_obj {B : Type u₁} [Quiver B] [(a b : B) → Quiver (a b)] {C : Type u₂} [Quiver C] [(a b : C) → Quiver (a b)] {D : Type u₃} [Quiver D] [(a b : D) → Quiver (a b)] (F : CategoryTheory.PrelaxFunctor B C) (G : CategoryTheory.PrelaxFunctor C D) :
      ∀ (a : B), (↑(CategoryTheory.PrelaxFunctor.comp F G)).obj a = (F ⋙q G).obj a
      @[simp]
      theorem CategoryTheory.PrelaxFunctor.comp_map₂ {B : Type u₁} [Quiver B] [(a b : B) → Quiver (a b)] {C : Type u₂} [Quiver C] [(a b : C) → Quiver (a b)] {D : Type u₃} [Quiver D] [(a b : D) → Quiver (a b)] (F : CategoryTheory.PrelaxFunctor B C) (G : CategoryTheory.PrelaxFunctor C D) :
      def CategoryTheory.PrelaxFunctor.comp {B : Type u₁} [Quiver B] [(a b : B) → Quiver (a b)] {C : Type u₂} [Quiver C] [(a b : C) → Quiver (a b)] {D : Type u₃} [Quiver D] [(a b : D) → Quiver (a b)] (F : CategoryTheory.PrelaxFunctor B C) (G : CategoryTheory.PrelaxFunctor C D) :

      Composition of prelax functors.

      Instances For
        structure CategoryTheory.OplaxFunctor (B : Type u₁) [CategoryTheory.Bicategory B] (C : Type u₂) [CategoryTheory.Bicategory C] extends CategoryTheory.PrelaxFunctor :
        Type (max (max (max (max (max u₁ u₂) v₁) v₂) w₁) w₂)

        An oplax functor F between bicategories B and C consists of a function between objects F.obj, a function between 1-morphisms F.map, and a function between 2-morphisms F.map₂.

        Unlike functors between categories, F.map do not need to strictly commute with the composition, and do not need to strictly preserve the identity. Instead, there are specified 2-morphisms F.map (𝟙 a) ⟶ 𝟙 (F.obj a) and F.map (f ≫ g) ⟶ F.map f ≫ F.map g.

        F.map₂ strictly commute with compositions and preserve the identity. They also preserve the associator, the left unitor, and the right unitor modulo some adjustments of domains and codomains of 2-morphisms.

        Instances For
          @[simp]
          theorem CategoryTheory.OplaxFunctor.map₂_associator_assoc {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (self : CategoryTheory.OplaxFunctor B C) {a : B} {b : B} {c : B} {d : B} (f : a b) (g : b c) (h : c d) {Z : (self.toPrelaxFunctor).obj a (self.toPrelaxFunctor).obj d} (h : CategoryTheory.CategoryStruct.comp ((self.toPrelaxFunctor).map f) (CategoryTheory.CategoryStruct.comp ((self.toPrelaxFunctor).map g) ((self.toPrelaxFunctor).map h)) Z) :
          @[simp]
          theorem CategoryTheory.OplaxFunctor.mapComp_naturality_left_assoc {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (self : CategoryTheory.OplaxFunctor B C) {a : B} {b : B} {c : B} {f : a b} {f' : a b} (η : f f') (g : b c) {Z : (self.toPrelaxFunctor).obj a (self.toPrelaxFunctor).obj c} (h : CategoryTheory.CategoryStruct.comp ((self.toPrelaxFunctor).map f') ((self.toPrelaxFunctor).map g) Z) :
          @[simp]
          theorem CategoryTheory.OplaxFunctor.mapComp_naturality_right_assoc {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (self : CategoryTheory.OplaxFunctor B C) {a : B} {b : B} {c : B} (f : a b) {g : b c} {g' : b c} (η : g g') {Z : (self.toPrelaxFunctor).obj a (self.toPrelaxFunctor).obj c} (h : CategoryTheory.CategoryStruct.comp ((self.toPrelaxFunctor).map f) ((self.toPrelaxFunctor).map g') Z) :
          theorem CategoryTheory.OplaxFunctor.map₂_comp_assoc {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (self : CategoryTheory.OplaxFunctor B C) {a : B} {b : B} {f : a b} {g : a b} {h : a b} (η : f g) (θ : g h) {Z : (self.toPrelaxFunctor).obj a (self.toPrelaxFunctor).obj b} (h : (self.toPrelaxFunctor).map h Z) :
          @[simp]
          theorem CategoryTheory.OplaxFunctor.mapFunctor_obj {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (F : CategoryTheory.OplaxFunctor B C) (a : B) (b : B) (f : a b) :
          (CategoryTheory.OplaxFunctor.mapFunctor F a b).obj f = (F.toPrelaxFunctor).map f
          @[simp]
          theorem CategoryTheory.OplaxFunctor.mapFunctor_map {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (F : CategoryTheory.OplaxFunctor B C) (a : B) (b : B) :
          ∀ {X Y : a b} (η : X Y), (CategoryTheory.OplaxFunctor.mapFunctor F a b).map η = CategoryTheory.PrelaxFunctor.map₂ F.toPrelaxFunctor η
          def CategoryTheory.OplaxFunctor.mapFunctor {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (F : CategoryTheory.OplaxFunctor B C) (a : B) (b : B) :
          CategoryTheory.Functor (a b) ((F.toPrelaxFunctor).obj a (F.toPrelaxFunctor).obj b)

          Function between 1-morphisms as a functor.

          Instances For

            The identity oplax functor.

            Instances For

              A structure on an oplax functor that promotes an oplax functor to a pseudofunctor. See Pseudofunctor.mkOfOplax.

              Instances For
                structure CategoryTheory.Pseudofunctor (B : Type u₁) [CategoryTheory.Bicategory B] (C : Type u₂) [CategoryTheory.Bicategory C] extends CategoryTheory.PrelaxFunctor :
                Type (max (max (max (max (max u₁ u₂) v₁) v₂) w₁) w₂)

                A pseudofunctor F between bicategories B and C consists of a function between objects F.obj, a function between 1-morphisms F.map, and a function between 2-morphisms F.map₂.

                Unlike functors between categories, F.map do not need to strictly commute with the compositions, and do not need to strictly preserve the identity. Instead, there are specified 2-isomorphisms F.map (𝟙 a) ≅ 𝟙 (F.obj a) and F.map (f ≫ g) ≅ F.map f ≫ F.map g.

                F.map₂ strictly commute with compositions and preserve the identity. They also preserve the associator, the left unitor, and the right unitor modulo some adjustments of domains and codomains of 2-morphisms.

                Instances For
                  theorem CategoryTheory.Pseudofunctor.map₂_comp_assoc {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (self : CategoryTheory.Pseudofunctor B C) {a : B} {b : B} {f : a b} {g : a b} {h : a b} (η : f g) (θ : g h) {Z : (self.toPrelaxFunctor).obj a (self.toPrelaxFunctor).obj b} (h : (self.toPrelaxFunctor).map h Z) :
                  theorem CategoryTheory.Pseudofunctor.map₂_whisker_right_assoc {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (self : CategoryTheory.Pseudofunctor B C) {a : B} {b : B} {c : B} {f : a b} {g : a b} (η : f g) (h : b c) {Z : (self.toPrelaxFunctor).obj a (self.toPrelaxFunctor).obj c} (h : (self.toPrelaxFunctor).map (CategoryTheory.CategoryStruct.comp g h) Z) :
                  theorem CategoryTheory.Pseudofunctor.map₂_whisker_left_assoc {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (self : CategoryTheory.Pseudofunctor B C) {a : B} {b : B} {c : B} (f : a b) {g : b c} {h : b c} (η : g h) {Z : (self.toPrelaxFunctor).obj a (self.toPrelaxFunctor).obj c} (h : (self.toPrelaxFunctor).map (CategoryTheory.CategoryStruct.comp f h) Z) :
                  theorem CategoryTheory.Pseudofunctor.map₂_associator_assoc {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (self : CategoryTheory.Pseudofunctor B C) {a : B} {b : B} {c : B} {d : B} (f : a b) (g : b c) (h : c d) {Z : (self.toPrelaxFunctor).obj a (self.toPrelaxFunctor).obj d} (h : (self.toPrelaxFunctor).map (CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g h)) Z) :

                  The oplax functor associated with a pseudofunctor.

                  Instances For
                    def CategoryTheory.Pseudofunctor.mapFunctor {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (F : CategoryTheory.Pseudofunctor B C) (a : B) (b : B) :
                    CategoryTheory.Functor (a b) ((F.toPrelaxFunctor).obj a (F.toPrelaxFunctor).obj b)

                    Function on 1-morphisms as a functor.

                    Instances For

                      The identity pseudofunctor.

                      Instances For
                        @[simp]
                        theorem CategoryTheory.Pseudofunctor.comp_mapComp {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] {D : Type u₃} [CategoryTheory.Bicategory D] (F : CategoryTheory.Pseudofunctor B C) (G : CategoryTheory.Pseudofunctor C D) :
                        ∀ {a b c : B} (f : a b) (g : b c), CategoryTheory.Pseudofunctor.mapComp (CategoryTheory.Pseudofunctor.comp F G) f g = (CategoryTheory.Pseudofunctor.mapFunctor G ((F.toPrelaxFunctor).obj a) ((F.toPrelaxFunctor).obj c)).mapIso (CategoryTheory.Pseudofunctor.mapComp F f g) ≪≫ CategoryTheory.Pseudofunctor.mapComp G ((F.toPrelaxFunctor).map f) ((F.toPrelaxFunctor).map g)

                        Construct a pseudofunctor from an oplax functor whose mapId and mapComp are isomorphisms.

                        Instances For

                          Construct a pseudofunctor from an oplax functor whose mapId and mapComp are isomorphisms.

                          Instances For