Category of relations (source code)

= Category of relations
{title2=$\mathbf{Rel}$}

For a <regular category> $\mathcal C$, the category $\mathbf{Rel}(\mathcal C)$ has the objects of $\mathcal C$ and subobjects of $A\times B$ as relations $A\rightsquigarrow B$. Composition takes the image of the pullback expressing existential quantification over the middle object.

For $\mathcal C=\mathbf{Set}$ this is the <category of relations (sets)>; the general construction also applies to other <regular categories>.