\begin{definition}[Definition:Restriction/Mapping]
Let $f: S \to T$ be a mapping.
Let $X \subseteq S$.
Let $f \sqbrk X \subseteq Y \subseteq T$.
The '''restriction of $f$ to $X \times Y$''' is the mapping $f {\restriction_{X \times Y} }: X \to Y$ defined as:
:$f {\restriction_{X \times Y} } = f \cap \paren {X \times Y}$
If $Y = T$, then we simply call this the '''restriction of $f$ to $X$''', and denote it as $f {\restriction_X}$.
A different way of saying the same thing is:
:$f {\restriction_X} = \set {\tuple {x, y} \in f: x \in X}$
or:
:$f {\restriction_X} = \set {\tuple {x, f \paren x}: x \in X}$
This definition follows directly from that for a relation owing to the fact that a mapping is a special kind of relation.
Note that $f {\restriction_X}$ is a mapping whose domain is $X$.
\end{definition}