8.3.3 The Closed Symmetric Monoidal Category of Relations
8.3.3.1 The Monoidal Product
The monoidal product of $\mathsf{Rel}$ is the functor
\[ \times \colon \mathsf{Rel}\times \mathsf{Rel}\to \mathsf{Rel} \]
where
-
•
Action on Objects. For each $A,B\in \operatorname {\mathrm{Obj}}(\mathsf{Rel})$, we have
\[ \mathord {\times }(A,B)\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}A\times B, \]
where $A\times B$ is the Cartesian product of sets of Chapter 4: Constructions With Sets, Definition 4.1.3.1.1.
-
•
Action on Morphisms. For each $(A,C),(B,D)\in \operatorname {\mathrm{Obj}}(\mathsf{Rel}\times \mathsf{Rel})$, the action on morphisms
\[ \times _{(A,C),(B,D)}\colon \mathrm{Rel}(A,B)\times \mathrm{Rel}(C,D)\to \mathrm{Rel}(A\times C,B\times D) \]
of $\times $ is given by sending a pair of morphisms $(R,S)$ of the form
\begin{align*} R & \colon A\mathrel {\rightarrow \kern -9.5pt\mathrlap {|}\kern 6pt}B,\\ S & \colon C\mathrel {\rightarrow \kern -9.5pt\mathrlap {|}\kern 6pt}D \end{align*}
to the relation
\[ R\times S\colon A\times C\mathrel {\rightarrow \kern -9.5pt\mathrlap {|}\kern 6pt}B\times D \]
of Chapter 9: Constructions With Relations, Definition 9.2.6.1.1.
8.3.3.2 The Monoidal Unit
The monoidal unit of $\mathsf{Rel}$ is the functor
\[ \mathbb {1}^{\mathsf{Rel}}\colon \mathrm{pt}\to \mathsf{Rel} \]
picking the set
\[ \mathbb {1}_{\mathsf{Rel}}\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\mathrm{pt} \]
of $\mathsf{Rel}$.
8.3.3.3 The Associator
The associator of $\mathsf{Rel}$ is the natural isomorphism
\[ \alpha ^{\mathsf{Rel}}\colon {\times }\circ {({(\times )}\times {\mathsf{id}})}\mathbin {\overset {\mathord {\sim }}{\Longrightarrow }}{\times }\circ {({\mathsf{id}}\times {(\times )})}\circ {\mathbf{\alpha }^{\mathsf{Cats}}_{\mathsf{Rel},\mathsf{Rel},\mathsf{Rel}}}\mathrlap {,} \]
as in the diagram
whose component
\[ \alpha ^{\mathsf{Rel}}_{A,B,C}\colon (A\times B)\times C\mathrel {\rightarrow \kern -9.5pt\mathrlap {|}\kern 6pt}A\times (B\times C) \]
at $A,B,C\in \operatorname {\mathrm{Obj}}(\mathsf{Rel})$ is the relation defined by declaring
\[ ((a,b),c) \sim _{\alpha ^{\mathsf{Rel}}_{A,B,C}} (a',(b',c')) \]
iff $a=a'$, $b=b'$, and $c=c'$.
8.3.3.4 The Left Unitor
The left unitor of $\mathsf{Rel}$ is the natural isomorphism
whose component
\[ \lambda ^{\mathsf{Rel}}_{A} \colon \mathbb {1}_{\mathsf{Rel}}\times A \mathrel {\rightarrow \kern -9.5pt\mathrlap {|}\kern 6pt}A \]
at $A$ is defined by declaring
\[ (\star ,a) \sim _{\lambda ^{\mathsf{Rel}}_{A}} b \]
iff $a=b$.
8.3.3.5 The Right Unitor
The right unitor of $\mathsf{Rel}$ is the natural isomorphism
whose component
\[ \rho ^{\mathsf{Rel}}_{A} \colon A\times \mathbb {1}_{\mathsf{Rel}} \mathrel {\rightarrow \kern -9.5pt\mathrlap {|}\kern 6pt}A \]
at $A$ is defined by declaring
\[ (a,\star ) \sim _{\rho ^{\mathsf{Rel}}_{A}} b \]
iff $a=b$.
8.3.3.6 The Symmetry
The symmetry of $\mathsf{Rel}$ is the natural isomorphism
whose component
\[ \sigma ^{\mathsf{Rel}}_{A,B} \colon A\times B \to B\times A \]
at $(A,B)$ is defined by declaring
\[ (a,b) \sim _{\sigma ^{\mathsf{Rel}}_{A,B}} (b',a') \]
iff $a=a'$ and $b=b'$.
8.3.3.7 The Internal Hom
The internal Hom of $\mathsf{Rel}$ is the functor
\[ \mathrm{Rel}\colon \mathsf{Rel}^{\mathsf{op}}\times \mathsf{Rel}\to \mathsf{Rel} \]
defined
-
•
On objects by sending $A,B\in \operatorname {\mathrm{Obj}}(\mathsf{Rel})$ to the set $\mathrm{Rel}(A,B)$ of
of
.
-
•
On morphisms by pre/post-composition defined as in Definition 8.1.3.1.1.
Let $A,B,C\in \operatorname {\mathrm{Obj}}(\mathsf{Rel})$.
-
1.
Adjointness. We have adjunctions
witnessed by bijections
\begin{align*} \mathrm{Rel}(A\times B,C) & \cong \mathrm{Rel}(A,\mathrm{Rel}(B,C)),\\ \mathrm{Rel}(A\times B,C) & \cong \mathrm{Rel}(B,\mathrm{Rel}(A,C)), \end{align*}
natural in $A,B,C\in \operatorname {\mathrm{Obj}}(\mathsf{Rel})$.
Indeed, we have
\begin{align*} \mathrm{Rel}(A\times B,C) & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\mathsf{Sets}(A\times B\times C,\{ \mathsf{true},\mathsf{false}\} )\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\mathrm{Rel}(A,B\times C)\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\mathrm{Rel}(A,\mathrm{Rel}(B,C)), \end{align*}
and similarly for the bijection $\mathrm{Rel}(A\times B,C)\cong \mathrm{Rel}(B,\mathrm{Rel}(A,C))$.