From Wikipedia, the free encyclopedia
In category theory , profunctors are a generalization of relations and also of bimodules .
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
ϕ
:
C
o
p
×
D
→
S
e
t
{\displaystyle \phi :C^{\mathrm {op} }\times D\to \mathbf {Set} }
.
Using the cartesian closure of
C
a
t
{\displaystyle \mathbf {Cat} }
, a profunctor
ϕ
:
C
↛
D
{\displaystyle \phi :C\nrightarrow D}
can be seen as a functor
ϕ
^
:
D
→
C
^
{\displaystyle {\hat {\phi }}:D\to {\hat {C}}}
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}
.
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
ψ
ϕ
=
L
a
n
Y
D
(
ψ
^
)
∘
ϕ
{\displaystyle \psi \phi =\mathrm {Lan} _{Y_{D}}({\hat {\psi }})\circ \phi }
where is
L
a
n
Y
D
(
ψ
^
)
{\displaystyle \mathrm {Lan} _{Y_{D}}({\hat {\psi }})}
the left Kan extension of the functor
ψ
^
{\displaystyle {\hat {\psi }}}
along the Yoneda functor
Y
D
{\displaystyle Y_{D}}
of
D
{\displaystyle D}
(which to every object
d
{\displaystyle d}
of
D
{\displaystyle D}
associates the functor
D
(
−
,
d
)
:
D
→
S
e
t
{\displaystyle D(-,d):D\to \mathrm {Set} }
).
It can be shown that
(
ψ
ϕ
)
(
e
,
c
)
=
(
∐
d
∈
D
ψ
(
e
,
d
)
×
ϕ
(
d
,
c
)
)
/
∼
{\displaystyle (\psi \phi )(e,c)=\left(\coprod _{d\in D}\psi (e,d)\times \phi (d,c)\right)/\sim }
where
∼
{\displaystyle \sim }
is the least equivalence relation such that
(
y
′
,
x
′
)
∼
(
y
,
x
)
{\displaystyle (y',x')\sim (y,x)}
whenever there exists a morphism
v
{\displaystyle v}
in
B
{\displaystyle B}
such that
y
′
=
v
y
{\displaystyle y'=vy}
and
x
′
v
=
x
{\displaystyle x'v=x}
.
Composition of profunctors is associative only up to isomorphism. It is therefore natural 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.
References
Jean Bénabou (2000). "Distributors at Work" .