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 := fun a ↦ (G.mapFunctor _ _).mapIso (F.mapId a) ≪≫ G.mapId (F.obj a),
    mapCompIso := fun 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₂)

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

  • obj : BC
  • map : {X Y : B} → (X Y)(self.obj X self.obj Y)
  • map₂ : {a b : B} → {f g : a b} → (f g)(self.map f self.map g)

    The action of a prelax functor on 2-morphisms.

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)] :
    Equations
    • CategoryTheory.PrelaxFunctor.hasCoeToPrefunctor = { coe := CategoryTheory.PrelaxFunctor.toPrefunctor }
    @[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.id B).map₂ η = η

    The identity prelax functor.

    Equations
    Instances For
      Equations
      @[simp]
      theorem CategoryTheory.PrelaxFunctor.comp_toPrefunctor {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) :
      @[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) :
      ∀ {a b : B} {f g : a b} (η : f g), (CategoryTheory.PrelaxFunctor.comp F G).map₂ η = G.map₂ (F.map₂ η)
      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.

      Equations
      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.obj a self.obj d} (h : CategoryTheory.CategoryStruct.comp (self.map f) (CategoryTheory.CategoryStruct.comp (self.map g) (self.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.obj a self.obj c} (h : CategoryTheory.CategoryStruct.comp (self.map f') (self.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.obj a self.obj c} (h : CategoryTheory.CategoryStruct.comp (self.map f) (self.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.obj a self.obj b} (h : self.map h✝ Z) :
          Equations
          • CategoryTheory.OplaxFunctor.hasCoeToPrelax = { coe := CategoryTheory.OplaxFunctor.toPrelaxFunctor }
          @[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 η = F.map₂ η

          Function between 1-morphisms as a functor.

          Equations
          Instances For

            The identity oplax functor.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Equations

              Composition of oplax functors.

              Equations
              • One or more equations did not get rendered due to their size.
              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.obj a self.obj b} (h : self.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.obj a self.obj c} (h : self.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.obj a self.obj c} (h : self.map (CategoryTheory.CategoryStruct.comp f h✝) Z) :
                    Equations
                    • CategoryTheory.Pseudofunctor.hasCoeToPrelaxFunctor = { coe := CategoryTheory.Pseudofunctor.toPrelaxFunctor }

                    The oplax functor associated with a pseudofunctor.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Equations
                      • CategoryTheory.Pseudofunctor.hasCoeToOplax = { coe := CategoryTheory.Pseudofunctor.toOplax }
                      @[simp]
                      theorem CategoryTheory.Pseudofunctor.to_oplax_mapComp {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (F : CategoryTheory.Pseudofunctor B C) {a : B} {b : B} {c : B} (f : a b) (g : b c) :
                      (CategoryTheory.Pseudofunctor.toOplax F).mapComp f g = (F.mapComp f g).hom

                      The identity pseudofunctor.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        Equations
                        @[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.comp F G).mapComp f g = (CategoryTheory.Pseudofunctor.mapFunctor G (F.obj a) (F.obj c)).mapIso (F.mapComp f g) ≪≫ G.mapComp (F.map f) (F.map g)

                        Composition of pseudofunctors.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          @[simp]

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

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[simp]
                            theorem CategoryTheory.Pseudofunctor.mkOfOplax'_toPrelaxFunctor {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (F : CategoryTheory.OplaxFunctor B C) [∀ (a : B), CategoryTheory.IsIso (F.mapId a)] [∀ {a b c : B} (f : a b) (g : b c), CategoryTheory.IsIso (F.mapComp f g)] :
                            (CategoryTheory.Pseudofunctor.mkOfOplax' F).toPrelaxFunctor = F.toPrelaxFunctor
                            @[simp]
                            theorem CategoryTheory.Pseudofunctor.mkOfOplax'_mapId {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (F : CategoryTheory.OplaxFunctor B C) [∀ (a : B), CategoryTheory.IsIso (F.mapId a)] [∀ {a b c : B} (f : a b) (g : b c), CategoryTheory.IsIso (F.mapComp f g)] (a : B) :
                            @[simp]
                            theorem CategoryTheory.Pseudofunctor.mkOfOplax'_mapComp {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (F : CategoryTheory.OplaxFunctor B C) [∀ (a : B), CategoryTheory.IsIso (F.mapId a)] [∀ {a b c : B} (f : a b) (g : b c), CategoryTheory.IsIso (F.mapComp f g)] :
                            ∀ {a b c : B} (f : a b) (g : b c), (CategoryTheory.Pseudofunctor.mkOfOplax' F).mapComp f g = CategoryTheory.asIso (F.mapComp f g)
                            noncomputable def CategoryTheory.Pseudofunctor.mkOfOplax' {B : Type u₁} [CategoryTheory.Bicategory B] {C : Type u₂} [CategoryTheory.Bicategory C] (F : CategoryTheory.OplaxFunctor B C) [∀ (a : B), CategoryTheory.IsIso (F.mapId a)] [∀ {a b c : B} (f : a b) (g : b c), CategoryTheory.IsIso (F.mapComp f g)] :

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

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For