Oplax functors and pseudofunctors #
An oplax functor F
between bicategories B
and C
consists of
- a function between objects
F.obj : B ⟶ C
, - a family of functions between 1-morphisms
F.map : (a ⟶ b) → (F.obj a ⟶ F.obj b)
, - a family of functions between 2-morphisms
F.map₂ : (f ⟶ g) → (F.map f ⟶ F.map g)
, - a family of 2-morphisms
F.mapId a : F.map (𝟙 a) ⟶ 𝟙 (F.obj a)
, - a family of 2-morphisms
F.mapComp f g : F.map (f ≫ g) ⟶ F.map f ≫ F.map g
, and - certain consistency conditions on them.
A pseudofunctor is an oplax functor whose mapId
and mapComp
are isomorphisms. We provide
several constructors for pseudofunctors:
Pseudofunctor.mk
: the default constructor, which requiresmap₂_whiskerLeft
andmap₂_whiskerRight
instead of naturality ofmapComp
.Pseudofunctor.mkOfOplax
: construct a pseudofunctor from an oplax functor whosemapId
andmapComp
are isomorphisms. This constructor usesIso
to describe isomorphisms.pseudofunctor.mkOfOplax'
: similar tomkOfOplax
, but usesIsIso
to describe isomorphisms.
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 #
CategoryTheory.OplaxFunctor B C
: an oplax functor between bicategoriesB
andC
CategoryTheory.OplaxFunctor.comp F G
: the composition of oplax functorsCategoryTheory.Pseudofunctor B C
: a pseudofunctor between bicategoriesB
andC
CategoryTheory.Pseudofunctor.comp F G
: the composition of pseudofunctors
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.
- obj : B → C
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
Equations
- CategoryTheory.PrelaxFunctor.hasCoeToPrefunctor = { coe := CategoryTheory.PrelaxFunctor.toPrefunctor }
The identity prelax functor.
Equations
- CategoryTheory.PrelaxFunctor.id B = let src := 𝟭q B; { toPrefunctor := { obj := src.obj, map := fun {X Y} => src.map }, map₂ := fun {a b} {f g} η => η }
Instances For
Equations
- CategoryTheory.PrelaxFunctor.instInhabitedPrelaxFunctor = { default := CategoryTheory.PrelaxFunctor.id B }
Composition of prelax functors.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- obj : B → C
- mapId : (a : B) → (↑s.toPrelaxFunctor).map (CategoryTheory.CategoryStruct.id a) ⟶ CategoryTheory.CategoryStruct.id ((↑s.toPrelaxFunctor).obj a)
- mapComp : {a b c : B} → (f : a ⟶ b) → (g : b ⟶ c) → (↑s.toPrelaxFunctor).map (CategoryTheory.CategoryStruct.comp f g) ⟶ CategoryTheory.CategoryStruct.comp ((↑s.toPrelaxFunctor).map f) ((↑s.toPrelaxFunctor).map g)
- mapComp_naturality_left : ∀ {a b c : B} {f f' : a ⟶ b} (η : f ⟶ f') (g : b ⟶ c), CategoryTheory.CategoryStruct.comp (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.Bicategory.whiskerRight η g)) (CategoryTheory.OplaxFunctor.mapComp s f' g) = CategoryTheory.CategoryStruct.comp (CategoryTheory.OplaxFunctor.mapComp s f g) (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor η) ((↑s.toPrelaxFunctor).map g))
- mapComp_naturality_right : ∀ {a b c : B} (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g'), CategoryTheory.CategoryStruct.comp (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.Bicategory.whiskerLeft f η)) (CategoryTheory.OplaxFunctor.mapComp s f g') = CategoryTheory.CategoryStruct.comp (CategoryTheory.OplaxFunctor.mapComp s f g) (CategoryTheory.Bicategory.whiskerLeft ((↑s.toPrelaxFunctor).map f) (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor η))
- map₂_id : ∀ {a b : B} (f : a ⟶ b), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.CategoryStruct.id f) = CategoryTheory.CategoryStruct.id ((↑s.toPrelaxFunctor).map f)
- map₂_comp : ∀ {a b : B} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.CategoryStruct.comp η θ) = CategoryTheory.CategoryStruct.comp (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor η) (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor θ)
- map₂_associator : ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), CategoryTheory.CategoryStruct.comp (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.Bicategory.associator f g h).hom) (CategoryTheory.CategoryStruct.comp (CategoryTheory.OplaxFunctor.mapComp s f (CategoryTheory.CategoryStruct.comp g h)) (CategoryTheory.Bicategory.whiskerLeft ((↑s.toPrelaxFunctor).map f) (CategoryTheory.OplaxFunctor.mapComp s g h))) = CategoryTheory.CategoryStruct.comp (CategoryTheory.OplaxFunctor.mapComp s (CategoryTheory.CategoryStruct.comp f g) h) (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.OplaxFunctor.mapComp s f g) ((↑s.toPrelaxFunctor).map h)) (CategoryTheory.Bicategory.associator ((↑s.toPrelaxFunctor).map f) ((↑s.toPrelaxFunctor).map g) ((↑s.toPrelaxFunctor).map h)).hom)
- map₂_leftUnitor : ∀ {a b : B} (f : a ⟶ b), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.Bicategory.leftUnitor f).hom = CategoryTheory.CategoryStruct.comp (CategoryTheory.OplaxFunctor.mapComp s (CategoryTheory.CategoryStruct.id a) f) (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.OplaxFunctor.mapId s a) ((↑s.toPrelaxFunctor).map f)) (CategoryTheory.Bicategory.leftUnitor ((↑s.toPrelaxFunctor).map f)).hom)
- map₂_rightUnitor : ∀ {a b : B} (f : a ⟶ b), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.Bicategory.rightUnitor f).hom = CategoryTheory.CategoryStruct.comp (CategoryTheory.OplaxFunctor.mapComp s f (CategoryTheory.CategoryStruct.id b)) (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft ((↑s.toPrelaxFunctor).map f) (CategoryTheory.OplaxFunctor.mapId s b)) (CategoryTheory.Bicategory.rightUnitor ((↑s.toPrelaxFunctor).map f)).hom)
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
Equations
- CategoryTheory.OplaxFunctor.hasCoeToPrelax = { coe := CategoryTheory.OplaxFunctor.toPrelaxFunctor }
Function between 1-morphisms as a functor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The identity oplax functor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- CategoryTheory.OplaxFunctor.instInhabitedOplaxFunctor = { default := CategoryTheory.OplaxFunctor.id B }
Composition of oplax functors.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- mapIdIso : (a : B) → (↑F.toPrelaxFunctor).map (CategoryTheory.CategoryStruct.id a) ≅ CategoryTheory.CategoryStruct.id ((↑F.toPrelaxFunctor).obj a)
- mapCompIso : {a b c : B} → (f : a ⟶ b) → (g : b ⟶ c) → (↑F.toPrelaxFunctor).map (CategoryTheory.CategoryStruct.comp f g) ≅ CategoryTheory.CategoryStruct.comp ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g)
- mapIdIso_hom : ∀ {a : B}, (CategoryTheory.OplaxFunctor.PseudoCore.mapIdIso s a).hom = CategoryTheory.OplaxFunctor.mapId F a
- mapCompIso_hom : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), (CategoryTheory.OplaxFunctor.PseudoCore.mapCompIso s f g).hom = CategoryTheory.OplaxFunctor.mapComp F f g
A structure on an oplax functor that promotes an oplax functor to a pseudofunctor.
See Pseudofunctor.mkOfOplax
.
Instances For
- obj : B → C
- mapId : (a : B) → (↑s.toPrelaxFunctor).map (CategoryTheory.CategoryStruct.id a) ≅ CategoryTheory.CategoryStruct.id ((↑s.toPrelaxFunctor).obj a)
- mapComp : {a b c : B} → (f : a ⟶ b) → (g : b ⟶ c) → (↑s.toPrelaxFunctor).map (CategoryTheory.CategoryStruct.comp f g) ≅ CategoryTheory.CategoryStruct.comp ((↑s.toPrelaxFunctor).map f) ((↑s.toPrelaxFunctor).map g)
- map₂_id : ∀ {a b : B} (f : a ⟶ b), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.CategoryStruct.id f) = CategoryTheory.CategoryStruct.id ((↑s.toPrelaxFunctor).map f)
- map₂_comp : ∀ {a b : B} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.CategoryStruct.comp η θ) = CategoryTheory.CategoryStruct.comp (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor η) (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor θ)
- map₂_whisker_left : ∀ {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g ⟶ h), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.Bicategory.whiskerLeft f η) = CategoryTheory.CategoryStruct.comp (CategoryTheory.Pseudofunctor.mapComp s f g).hom (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft ((↑s.toPrelaxFunctor).map f) (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor η)) (CategoryTheory.Pseudofunctor.mapComp s f h).inv)
- map₂_whisker_right : ∀ {a b c : B} {f g : a ⟶ b} (η : f ⟶ g) (h : b ⟶ c), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.Bicategory.whiskerRight η h) = CategoryTheory.CategoryStruct.comp (CategoryTheory.Pseudofunctor.mapComp s f h).hom (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor η) ((↑s.toPrelaxFunctor).map h)) (CategoryTheory.Pseudofunctor.mapComp s g h).inv)
- map₂_associator : ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.Bicategory.associator f g h).hom = CategoryTheory.CategoryStruct.comp (CategoryTheory.Pseudofunctor.mapComp s (CategoryTheory.CategoryStruct.comp f g) h).hom (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Pseudofunctor.mapComp s f g).hom ((↑s.toPrelaxFunctor).map h)) (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator ((↑s.toPrelaxFunctor).map f) ((↑s.toPrelaxFunctor).map g) ((↑s.toPrelaxFunctor).map h)).hom (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft ((↑s.toPrelaxFunctor).map f) (CategoryTheory.Pseudofunctor.mapComp s g h).inv) (CategoryTheory.Pseudofunctor.mapComp s f (CategoryTheory.CategoryStruct.comp g h)).inv)))
- map₂_left_unitor : ∀ {a b : B} (f : a ⟶ b), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.Bicategory.leftUnitor f).hom = CategoryTheory.CategoryStruct.comp (CategoryTheory.Pseudofunctor.mapComp s (CategoryTheory.CategoryStruct.id a) f).hom (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Pseudofunctor.mapId s a).hom ((↑s.toPrelaxFunctor).map f)) (CategoryTheory.Bicategory.leftUnitor ((↑s.toPrelaxFunctor).map f)).hom)
- map₂_right_unitor : ∀ {a b : B} (f : a ⟶ b), CategoryTheory.PrelaxFunctor.map₂ s.toPrelaxFunctor (CategoryTheory.Bicategory.rightUnitor f).hom = CategoryTheory.CategoryStruct.comp (CategoryTheory.Pseudofunctor.mapComp s f (CategoryTheory.CategoryStruct.id b)).hom (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft ((↑s.toPrelaxFunctor).map f) (CategoryTheory.Pseudofunctor.mapId s b).hom) (CategoryTheory.Bicategory.rightUnitor ((↑s.toPrelaxFunctor).map f)).hom)
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
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 }
Function on 1-morphisms as a functor.
Equations
Instances For
The identity pseudofunctor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- CategoryTheory.Pseudofunctor.instInhabitedPseudofunctor = { default := CategoryTheory.Pseudofunctor.id B }
Composition of pseudofunctors.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
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.