# Profunctor

In category theory, a branch of mathematics, profunctors are a generalization of relations and also of bimodules. They are related to the notion of correspondences.

## Definition

A profunctor (also named distributor by the French school and module by the Sydney school) ${\displaystyle \,\phi }$ from a category ${\displaystyle C}$ to a category ${\displaystyle D}$, written

${\displaystyle \phi \colon C\nrightarrow D}$,

is defined to be a functor

${\displaystyle \phi \colon D^{\mathrm {op} }\times C\to \mathbf {Set} }$

Using the cartesian closure of ${\displaystyle \mathbf {Cat} }$, the category of small categories, the profunctor ${\displaystyle \phi }$ can be seen as a functor

${\displaystyle {\hat {\phi }}\colon C\to {\hat {D}}}$

### Composition of profunctors

The composite ${\displaystyle \psi \phi }$ of two profunctors

${\displaystyle \phi \colon C\nrightarrow D}$ and ${\displaystyle \psi \colon D\nrightarrow E}$

is given by

${\displaystyle \psi \phi =\mathrm {Lan} _{Y_{D}}({\hat {\psi }})\circ {\hat {\phi }}}$

It can be shown that

${\displaystyle (\psi \phi )(e,c)=\left(\coprod _{d\in D}\psi (e,d)\times \phi (d,c)\right){\Bigg /}\sim }$

where ${\displaystyle \sim }$ is the least equivalence relation such that ${\displaystyle (y',x')\sim (y,x)}$ whenever there exists a morphism ${\displaystyle v}$ in ${\displaystyle D}$ such that

${\displaystyle y'=vy\in \psi (e,d')}$ and ${\displaystyle x'v=x\in \phi (d,c)}$.

### The 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.

## Properties

### Lifting functors to profunctors

A functor ${\displaystyle F\colon C\to D}$ can be seen as a profunctor ${\displaystyle \phi _{F}\colon C\nrightarrow D}$ by postcomposing with the Yoneda functor:

${\displaystyle \phi _{F}=Y_{D}\circ F}$.

It can be shown that such a profunctor ${\displaystyle \phi _{F}}$ has a right adjoint. Moreover, this is a characterization: a profunctor ${\displaystyle \phi \colon C\nrightarrow D}$ has a right adjoint if and only if ${\displaystyle {\hat {\phi }}\colon C\to {\hat {D}}}$ factors through the Cauchy completion of ${\displaystyle D}$, i.e. there exists a functor ${\displaystyle F\colon C\to D}$ such that ${\displaystyle {\hat {\phi }}=Y_{D}\circ F}$.

## References

• {{#invoke:Citation/CS1|citation

|CitationClass=journal }}

• {{#invoke:citation/CS1|citation

|CitationClass=book }}

• {{#invoke:citation/CS1|citation

|CitationClass=book }}