6.1.3 Examples of Relations
The trivial relation on $A$ and $B$ is the relation $\mathord {\sim }_{\mathrm{triv}}$ defined equivalently as follows:
-
As a subset of $A\times B$, we have
\[ \mathord {\sim }_{\mathrm{triv}}\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}A\times B. \]
-
As a function from $A\times B$ to $\{ \mathsf{true},\mathsf{false}\} $, the relation $\mathord {\sim }_{\mathrm{triv}}$ is the constant function
\[ \Delta _{\mathsf{true}}\colon A\times B\to \{ \mathsf{true},\mathsf{false}\} \]
from $A\times B$ to $\{ \mathsf{true},\mathsf{false}\} $ taking the value $\mathsf{true}$.
-
As a function from $A$ to $\mathcal{P}\webleft (B\webright )$, the relation $\mathord {\sim }_{\mathrm{triv}}$ is the function
\[ \Delta _{\mathsf{true}}\colon A\to \mathcal{P}\webleft (B\webright ) \]
defined by
\[ \Delta _{\mathsf{true}}\webleft (a\webright )\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}B \]
for each $a\in A$.
-
Lastly, it is the unique relation $R$ on $A$ and $B$ such that we have $a\sim _{R}b$ for each $a\in A$ and each $b\in B$.
The cotrivial relation on $A$ and $B$ is the relation $\mathord {\sim }_{\mathrm{cotriv}}$ defined equivalently as follows:
-
As a subset of $A\times B$, we have
\[ \mathord {\sim }_{\mathrm{cotriv}}\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\text{Ø}. \]
-
As a function from $A\times B$ to $\{ \mathsf{true},\mathsf{false}\} $, the relation $\mathord {\sim }_{\mathrm{cotriv}}$ is the constant function
\[ \Delta _{\mathsf{false}}\colon A\times B\to \{ \mathsf{true},\mathsf{false}\} \]
from $A\times B$ to $\{ \mathsf{true},\mathsf{false}\} $ taking the value $\mathsf{false}$.
-
As a function from $A$ to $\mathcal{P}\webleft (B\webright )$, the relation $\mathord {\sim }_{\mathrm{cotriv}}$ is the function
\[ \Delta _{\mathsf{false}}\colon A\to \mathcal{P}\webleft (B\webright ) \]
defined by
\[ \Delta _{\mathsf{false}}\webleft (a\webright )\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\text{Ø} \]
for each $a\in A$.
-
Lastly, it is the unique relation $R$ on $A$ and $B$ such that we have $a\nsim _{R}b$ for each $a\in A$ and each $b\in B$.
The characteristic relation
\[ \chi _{X}\webleft (-_{1},-_{2}\webright )\colon X\times X\to \{ \mathsf{t},\mathsf{f}\} \]
on $X$ of Chapter 2: Constructions With Sets, of , defined by
\[ \chi _{X}\webleft (x,y\webright ) \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\begin{cases} \mathsf{true}& \text{if $x=y$,}\\ \mathsf{false}& \text{if $x\neq y$} \end{cases} \]
for each $x,y\in X$, is another example of a relation.
Square roots are examples of relations:
-
Square Roots in $\mathbb {R}$. The assignment $x\mapsto \sqrt{x}$ defines a relation
\[ \sqrt{-}\colon \mathbb {R}\to \mathcal{P}\webleft (\mathbb {R}\webright ) \]
from $\mathbb {R}$ to itself, being explicitly given by
\[ \sqrt{x}\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\begin{cases} 0 & \text{if $x=0$,}\\ \webleft\{ -\sqrt{\left\lvert x\right\rvert },\sqrt{\left\lvert x\right\rvert }\webright\} & \text{if $x\neq 0$.} \end{cases} \]
-
Square Roots in $\mathbb {Q}$. Square roots in $\mathbb {Q}$ are similar to square roots in $\mathbb {R}$, though now additionally it may also occur that $\sqrt{-}\colon \mathbb {Q}\to \mathcal{P}\webleft (\mathbb {Q}\webright )$ sends a rational number $x$ (e.g. $2$) to the empty set (since $\sqrt{2}\not\in \mathbb {Q}$).
The complex logarithm defines a relation
\[ \log \colon \mathbb {C}\to \mathcal{P}\webleft (\mathbb {C}\webright ) \]
from $\mathbb {C}$ to itself, where we have
\[ \log \webleft (a+bi\webright )\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\webleft\{ \log \webleft (\sqrt{a^{2}+b^{2}}\webright )+i\arg \webleft (a+bi\webright )+\webleft (2\pi i\webright )k\ \middle |\ k\in \mathbb {Z}\webright\} \]
for each $a+bi\in \mathbb {C}$.
See [Wikipedia, Multivalued Function] for more examples of relations, such as antiderivation, inverse trigonometric functions, and inverse hyperbolic functions.