In category theory, a branch of mathematics, profunctors are a generalization of relations and also of bimodules.
Definition A profunctor (also named distributor by the French school and module by the Sydney school) ϕ {\displaystyle \,\phi } from a category C {\displaystyle C} to a category D {\displaystyle D} , written
ϕ : C ↛ D {\displaystyle \phi :C\nrightarrow D} , is defined to be a functor
ϕ : D o p × C → S e t {\displaystyle \phi :D^{\mathrm {op} }\times C\to \mathbf {Set} }
where D o p {\displaystyle D^{\mathrm {op} }} denotes the opposite category of D {\displaystyle D} and S e t {\displaystyle \mathbf {Set} } denotes the category of sets. Given morphisms f : d → d ′ , g : c → c ′ {\displaystyle f:d\to d',g:c\to c'} respectively in D , C {\displaystyle D,C} and an element x ∈ ϕ ( d ′ , c ) {\displaystyle x\in \phi (d',c)} , we write x f ∈ ϕ ( d , c ) , g x ∈ ϕ ( d ′ , c ′ ) {\displaystyle xf\in \phi (d,c),gx\in \phi (d',c')} to denote the actions. Using that the category of small categories C a t {\displaystyle \mathbf {Cat} } is cartesian closed, the profunctor ϕ {\displaystyle \phi } can be seen as a functor
ϕ ^ : C → D ^ {\displaystyle {\hat {\phi }}:C\to {\hat {D}}}
where D ^ {\displaystyle {\hat {D}}} denotes the category S e t D o p {\displaystyle \mathrm {Set} ^{D^{\mathrm {op} }}} of presheaves over D {\displaystyle D} . A correspondence from C {\displaystyle C} to D {\displaystyle D} is a profunctor D ↛ C {\displaystyle D\nrightarrow C} .
Profunctors as categories An equivalent definition of a profunctor ϕ : C ↛ D {\displaystyle \phi :C\nrightarrow D} is a category whose objects are the disjoint union of the objects of C {\displaystyle C} and the objects of D {\displaystyle D} , and whose morphisms are the morphisms of C {\displaystyle C} and the morphisms of D {\displaystyle D} , plus zero or more additional morphisms from objects of D {\displaystyle D} to objects of C {\displaystyle C} . The sets in the formal definition above are the hom-sets between objects of D {\displaystyle D} and objects of C {\displaystyle C} . (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 ϕ op × ϕ → S e t {\displaystyle \phi ^{\text{op}}\times \phi \to \mathbf {Set} } to D op × C {\displaystyle D^{\text{op}}\times C} . This also makes it clear that a profunctor can be thought of as a relation between the objects of C {\displaystyle C} and the objects of D {\displaystyle D} , 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 ψ ϕ {\displaystyle \psi \phi } of two profunctors
ϕ : C ↛ D {\displaystyle \phi :C\nrightarrow D} and ψ : D ↛ E {\displaystyle \psi :D\nrightarrow E}
is given by
… excerpt ends here. Continue reading the full article.
