Profunctor
Generalization in mathematics
In category theory, a branch of mathematics, profunctors are a generalization of relations and also of bimodules.
01Definition
A profunctor (also named distributor by the French school and module by the Sydney school) from a category
to a category
, written
,
is defined to be a functor
where denotes the opposite category of
and
denotes the category of sets. Given morphisms
respectively in
and an element
, we write
to denote the actions.
Using that the category of small categories is cartesian closed, the profunctor
can be seen as a functor
where denotes the category
of presheaves over
.
A correspondence from to
is a profunctor
.
Profunctors as categories
An equivalent definition of a profunctor is a category whose objects are the disjoint union of the objects of
and the objects of
, and whose morphisms are the morphisms of
and the morphisms of
, plus zero or more additional morphisms from objects of
to objects of
. The sets in the formal definition above are the hom-sets between objects of
and objects of
. (These are also known as het-sets, since the corresponding morphisms can be called heteromorphisms.) The previous definition can be recovered by the restriction of the hom-functor
to
.
This also makes it clear that a profunctor can be thought of as a relation between the objects of and the objects of
, where each member of the relation is associated with a set of morphisms. A functor is a special case of a profunctor in the same way that a function is a special case of a relation.
Composition of profunctors
The composite of two profunctors
and
is given by
where is the left Kan extension of the functor
along the Yoneda functor
of
(which to every object
of
associates the functor
).
It can be shown that
where is the least equivalence relation such that
whenever there exists a morphism
in
such that
and
.
Equivalently, profunctor composition can be written using a coend
Bicategory of profunctors
Composition of profunctors is associative only up to isomorphism (because the product is not strictly associative in Set). The best one can hope is therefore to build a bicategory Prof whose
- 0-cells are small categories,
- 1-cells between two small categories are the profunctors between those categories,
- 2-cells between two profunctors are the natural transformations between those profunctors.
02Properties
Lifting functors to profunctors
A functor can be seen as a profunctor
by postcomposing with the Yoneda functor:
.
It can be shown that such a profunctor has a right adjoint. Moreover, this is a characterization: a profunctor
has a right adjoint if and only if
factors through the Cauchy completion of
, i.e. there exists a functor
such that
.
Sources and credits
This article is adapted from the Wikipedia article “Profunctor”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.