Oplax functors and pseudofunctors #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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.map_id a : F.map (𝟙 a) ⟶ 𝟙 (F.obj a)
, - a family of 2-morphisms
F.map_comp 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 map_id
and map_comp
are isomorphisms. We provide
several constructors for pseudofunctors:
pseudofunctor.mk
: the default constructor, which requiresmap₂_whisker_left
andmap₂_whisker_right
instead of naturality ofmap_comp
.pseudofunctor.mk_of_oplax
: construct a pseudofunctor from an oplax functor whosemap_id
andmap_comp
are isomorphisms. This constructor usesiso
to describe isomorphisms.pseudofunctor.mk_of_oplax'
: similar tomk_of_oplax
, but usesis_iso
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 pseudofunctor.comp (F : pseudofunctor B C) (G : pseudofunctor C D) : pseudofunctor B D :=
mk_of_oplax ((F : oplax_functor B C).comp G)
{ map_id_iso := λ a, (G.map_functor _ _).map_iso (F.map_id a) ≪≫ G.map_id (F.obj a),
map_comp_iso := λ a b c f g,
(G.map_functor _ _).map_iso (F.map_comp f g) ≪≫ G.map_comp (F.map f) (F.map g) }
although the composition of pseudofunctors in this file is defined by using the default constructor
because obviously
is smart enough. Similarly, the composition is also defined by using
mk_of_oplax'
after giving appropriate instances for is_iso
. The former constructor
mk_of_oplax
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
mk_of_oplax'
is useful if you want to use propositional type class is_iso
.
Main definitions #
category_theory.oplax_functor B C
: an oplax functor between bicategoriesB
andC
category_theory.oplax_functor.comp F G
: the composition of oplax functorscategory_theory.pseudofunctor B C
: a pseudofunctor between bicategoriesB
andC
category_theory.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 map_id
and map_comp
. We may need both in mathlib in the future, but for
now we only define oplax functors.
- obj : B → C
- 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)
A prelax functor between bicategories consists of functions between objects,
1-morphisms, and 2-morphisms. This structure will be extended to define oplax_functor
.
Instances for category_theory.prelax_functor
- category_theory.prelax_functor.has_sizeof_inst
- category_theory.prelax_functor.has_coe_to_prefunctor
- category_theory.prelax_functor.inhabited
- category_theory.oplax_functor.has_coe_to_prelax
- category_theory.pseudofunctor.has_coe_to_prelax_functor
Equations
- category_theory.prelax_functor.has_coe_to_prefunctor = {coe := category_theory.prelax_functor.to_prefunctor (λ (a b : C), _inst_4 a b)}
Equations
- category_theory.prelax_functor.inhabited = {default := category_theory.prelax_functor.id B (λ (a b : B), _inst_2 a b)}
Composition of prelax functors.
This auxiliary definition states that oplax functors preserve the associators modulo some adjustments of domains and codomains of 2-morphisms.
Equations
- category_theory.oplax_functor.map₂_associator_aux obj map map₂ map_comp f g h = (map₂ (category_theory.bicategory.associator f g h).hom ≫ map_comp f (g ≫ h) ≫ category_theory.bicategory.whisker_left (map f) (map_comp g h) = map_comp (f ≫ g) h ≫ category_theory.bicategory.whisker_right (map_comp f g) (map h) ≫ (category_theory.bicategory.associator (map f) (map g) (map h)).hom)
The prelax functor between the underlying quivers.
- obj : B → C
- 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)
- map_id : Π (a : B), self.map (𝟙 a) ⟶ 𝟙 (self.obj a)
- map_comp : Π {a b c : B} (f : a ⟶ b) (g : b ⟶ c), self.map (f ≫ g) ⟶ self.map f ≫ self.map g
- map_comp_naturality_left' : (∀ {a b c : B} {f f' : a ⟶ b} (η : f ⟶ f') (g : b ⟶ c), self.map₂ (category_theory.bicategory.whisker_right η g) ≫ self.map_comp f' g = self.map_comp f g ≫ category_theory.bicategory.whisker_right (self.map₂ η) (self.map g)) . "obviously"
- map_comp_naturality_right' : (∀ {a b c : B} (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g'), self.map₂ (category_theory.bicategory.whisker_left f η) ≫ self.map_comp f g' = self.map_comp f g ≫ category_theory.bicategory.whisker_left (self.map f) (self.map₂ η)) . "obviously"
- map₂_id' : (∀ {a b : B} (f : a ⟶ b), self.map₂ (𝟙 f) = 𝟙 (self.map f)) . "obviously"
- map₂_comp' : (∀ {a b : B} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h), self.map₂ (η ≫ θ) = self.map₂ η ≫ self.map₂ θ) . "obviously"
- map₂_associator' : (∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), category_theory.oplax_functor.map₂_associator_aux self.obj (λ (_x _x_1 : B), self.map) (λ (a b : B) (f g : a ⟶ b), self.map₂) (λ (a b c : B), self.map_comp) f g h) . "obviously"
- map₂_left_unitor' : (∀ {a b : B} (f : a ⟶ b), self.map₂ (category_theory.bicategory.left_unitor f).hom = self.map_comp (𝟙 a) f ≫ category_theory.bicategory.whisker_right (self.map_id a) (self.map f) ≫ (category_theory.bicategory.left_unitor (self.map f)).hom) . "obviously"
- map₂_right_unitor' : (∀ {a b : B} (f : a ⟶ b), self.map₂ (category_theory.bicategory.right_unitor f).hom = self.map_comp f (𝟙 b) ≫ category_theory.bicategory.whisker_left (self.map f) (self.map_id b) ≫ (category_theory.bicategory.right_unitor (self.map f)).hom) . "obviously"
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 category_theory.oplax_functor
- category_theory.oplax_functor.has_sizeof_inst
- category_theory.oplax_functor.has_coe_to_prelax
- category_theory.oplax_functor.inhabited
- category_theory.pseudofunctor.has_coe_to_oplax
- category_theory.oplax_nat_trans.category_theory.oplax_functor.category_theory.category_struct
- category_theory.oplax_functor.bicategory
Equations
Function between 1-morphisms as a functor.
The identity oplax functor.
Equations
- category_theory.oplax_functor.id B = {obj := (category_theory.prelax_functor.id B).obj, map := (category_theory.prelax_functor.id B).map, map₂ := (category_theory.prelax_functor.id B).map₂, map_id := λ (a : B), 𝟙 (𝟙 a), map_comp := λ (a b c : B) (f : a ⟶ b) (g : b ⟶ c), 𝟙 (f ≫ g), map_comp_naturality_left' := _, map_comp_naturality_right' := _, map₂_id' := _, map₂_comp' := _, map₂_associator' := _, map₂_left_unitor' := _, map₂_right_unitor' := _}
Equations
Composition of oplax functors.
Equations
- F.comp G = {obj := (↑F.comp ↑G).obj, map := (↑F.comp ↑G).map, map₂ := (↑F.comp ↑G).map₂, map_id := λ (a : B), (G.map_functor (↑↑F.obj a) (↑↑F.obj a)).map (F.map_id a) ≫ G.map_id (F.obj a), map_comp := λ (a b c : B) (f : a ⟶ b) (g : b ⟶ c), (G.map_functor (↑↑F.obj a) (↑↑F.obj c)).map (F.map_comp f g) ≫ G.map_comp (F.map f) (F.map g), map_comp_naturality_left' := _, map_comp_naturality_right' := _, map₂_id' := _, map₂_comp' := _, map₂_associator' := _, map₂_left_unitor' := _, map₂_right_unitor' := _}
- map_id_iso : Π (a : B), F.map (𝟙 a) ≅ 𝟙 (F.obj a)
- map_comp_iso : Π {a b c : B} (f : a ⟶ b) (g : b ⟶ c), F.map (f ≫ g) ≅ F.map f ≫ F.map g
- map_id_iso_hom' : (∀ {a : B}, (self.map_id_iso a).hom = F.map_id a) . "obviously"
- map_comp_iso_hom' : (∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), (self.map_comp_iso f g).hom = F.map_comp f g) . "obviously"
A structure on an oplax functor that promotes an oplax functor to a pseudofunctor.
See pseudofunctor.mk_of_oplax
.
Instances for category_theory.oplax_functor.pseudo_core
- category_theory.oplax_functor.pseudo_core.has_sizeof_inst
This auxiliary definition states that pseudofunctors preserve the associators modulo some adjustments of domains and codomains of 2-morphisms.
Equations
- category_theory.pseudofunctor.map₂_associator_aux obj map map₂ map_comp f g h = (map₂ (category_theory.bicategory.associator f g h).hom = (map_comp (f ≫ g) h).hom ≫ category_theory.bicategory.whisker_right (map_comp f g).hom (map h) ≫ (category_theory.bicategory.associator (map f) (map g) (map h)).hom ≫ category_theory.bicategory.whisker_left (map f) (map_comp g h).inv ≫ (map_comp f (g ≫ h)).inv)
- obj : B → C
- 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)
- map_id : Π (a : B), self.map (𝟙 a) ≅ 𝟙 (self.obj a)
- map_comp : Π {a b c : B} (f : a ⟶ b) (g : b ⟶ c), self.map (f ≫ g) ≅ self.map f ≫ self.map g
- map₂_id' : (∀ {a b : B} (f : a ⟶ b), self.map₂ (𝟙 f) = 𝟙 (self.map f)) . "obviously"
- map₂_comp' : (∀ {a b : B} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h), self.map₂ (η ≫ θ) = self.map₂ η ≫ self.map₂ θ) . "obviously"
- map₂_whisker_left' : (∀ {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g ⟶ h), self.map₂ (category_theory.bicategory.whisker_left f η) = (self.map_comp f g).hom ≫ category_theory.bicategory.whisker_left (self.map f) (self.map₂ η) ≫ (self.map_comp f h).inv) . "obviously"
- map₂_whisker_right' : (∀ {a b c : B} {f g : a ⟶ b} (η : f ⟶ g) (h : b ⟶ c), self.map₂ (category_theory.bicategory.whisker_right η h) = (self.map_comp f h).hom ≫ category_theory.bicategory.whisker_right (self.map₂ η) (self.map h) ≫ (self.map_comp g h).inv) . "obviously"
- map₂_associator' : (∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), category_theory.pseudofunctor.map₂_associator_aux self.obj (λ (a b : B), self.map) (λ (a b : B) (f g : a ⟶ b), self.map₂) (λ (a b c : B), self.map_comp) f g h) . "obviously"
- map₂_left_unitor' : (∀ {a b : B} (f : a ⟶ b), self.map₂ (category_theory.bicategory.left_unitor f).hom = (self.map_comp (𝟙 a) f).hom ≫ category_theory.bicategory.whisker_right (self.map_id a).hom (self.map f) ≫ (category_theory.bicategory.left_unitor (self.map f)).hom) . "obviously"
- map₂_right_unitor' : (∀ {a b : B} (f : a ⟶ b), self.map₂ (category_theory.bicategory.right_unitor f).hom = (self.map_comp f (𝟙 b)).hom ≫ category_theory.bicategory.whisker_left (self.map f) (self.map_id b).hom ≫ (category_theory.bicategory.right_unitor (self.map f)).hom) . "obviously"
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 category_theory.pseudofunctor
- category_theory.pseudofunctor.has_sizeof_inst
- category_theory.pseudofunctor.has_coe_to_prelax_functor
- category_theory.pseudofunctor.has_coe_to_oplax
- category_theory.pseudofunctor.inhabited
The prelax functor between the underlying quivers.
The oplax functor associated with a pseudofunctor.
Equations
- F.to_oplax = {obj := ↑F.obj, map := ↑F.map, map₂ := ↑F.map₂, map_id := λ (a : B), (F.map_id a).hom, map_comp := λ (a b c : B) (f : a ⟶ b) (g : b ⟶ c), (F.map_comp f g).hom, map_comp_naturality_left' := _, map_comp_naturality_right' := _, map₂_id' := _, map₂_comp' := _, map₂_associator' := _, map₂_left_unitor' := _, map₂_right_unitor' := _}
Equations
Function on 1-morphisms as a functor.
Equations
- F.map_functor a b = ↑F.map_functor a b
The identity pseudofunctor.
Equations
- category_theory.pseudofunctor.id B = {obj := (category_theory.prelax_functor.id B).obj, map := (category_theory.prelax_functor.id B).map, map₂ := (category_theory.prelax_functor.id B).map₂, map_id := λ (a : B), category_theory.iso.refl (𝟙 a), map_comp := λ (a b c : B) (f : a ⟶ b) (g : b ⟶ c), category_theory.iso.refl (f ≫ g), map₂_id' := _, map₂_comp' := _, map₂_whisker_left' := _, map₂_whisker_right' := _, map₂_associator' := _, map₂_left_unitor' := _, map₂_right_unitor' := _}
Equations
Composition of pseudofunctors.
Equations
- F.comp G = {obj := (↑F.comp ↑G).obj, map := (↑F.comp ↑G).map, map₂ := (↑F.comp ↑G).map₂, map_id := λ (a : B), (G.map_functor (↑↑F.obj a) (↑↑F.obj a)).map_iso (F.map_id a) ≪≫ G.map_id (F.obj a), map_comp := λ (a b c : B) (f : a ⟶ b) (g : b ⟶ c), (G.map_functor (↑↑F.obj a) (↑↑F.obj c)).map_iso (F.map_comp f g) ≪≫ G.map_comp (F.map f) (F.map g), map₂_id' := _, map₂_comp' := _, map₂_whisker_left' := _, map₂_whisker_right' := _, map₂_associator' := _, map₂_left_unitor' := _, map₂_right_unitor' := _}
Construct a pseudofunctor from an oplax functor whose map_id
and map_comp
are isomorphisms.
Equations
- category_theory.pseudofunctor.mk_of_oplax F F' = {obj := ↑F.obj, map := ↑F.map, map₂ := ↑F.map₂, map_id := F'.map_id_iso, map_comp := λ (_x _x_1 _x_2 : B), F'.map_comp_iso, map₂_id' := _, map₂_comp' := _, map₂_whisker_left' := _, map₂_whisker_right' := _, map₂_associator' := _, map₂_left_unitor' := _, map₂_right_unitor' := _}
Construct a pseudofunctor from an oplax functor whose map_id
and map_comp
are isomorphisms.
Equations
- category_theory.pseudofunctor.mk_of_oplax' F = {obj := ↑F.obj, map := ↑F.map, map₂ := ↑F.map₂, map_id := λ (a : B), category_theory.as_iso (F.map_id a), map_comp := λ (a b c : B) (f : a ⟶ b) (g : b ⟶ c), category_theory.as_iso (F.map_comp f g), map₂_id' := _, map₂_comp' := _, map₂_whisker_left' := _, map₂_whisker_right' := _, map₂_associator' := _, map₂_left_unitor' := _, map₂_right_unitor' := _}