A projection is always surjective (except possibly when one or more of the factors in the Cartesian product is the empty set).
restricting the domain
the “induced” function \(A \to Y\) created from function \(\funcdef{f}{X}{Y}\) and subset \(A \subseteq X\) by “forgetting” about all elements of \(X\) that do not lie in \(A\)
\(\funcres{f}{A}\)
restriction of function \(\funcdef{f}{X}{Y}\) to subset \(A \subseteq X\)
\(\altfuncres{f}{A}\)
alternative domain restriction notation
\(\res_A^X f\)
alternative domain restriction notation
Example10.3.6.Domain restriction.
For \(\funcdef{f}{\Z}{\N}\text{,}\)\(f(m) = \abs{m}\text{,}\) we have \(\funcres{f}{\N} = \id_{\N}\text{.}\)
Checkpoint10.3.7.Properties of restrictions.
Consider function \(\funcdef{f}{X}{Y}\) and subset \(A \subseteq X\text{.}\)
If \(f\) is injective, is \(\funcres{f}{A}\) injective?
If \(\funcres{f}{A}\) is injective, must \(f\) be injective?
Answer the previous two questions replacing “injective” with “surjective”.
Remark10.3.8.
The concept of restricting the domain makes our previously defined concept image of a function on a subset unnecessary: for function \(\funcdef{f}{X}{Y}\) and subset \(A \subseteq X\text{,}\) the image of \(f\) on \(A\) is the same as the image of the restriction \(\funcres{f}{A}\text{.}\)
restricting the codomain
the “induced” function \(X \to B\) created from function \(\funcdef{f}{X}{Y}\) and subset \(B \subseteq Y\) by “forgetting” about all elements of \(Y\) that do not lie in \(B\text{,}\)where \(B\) must contain the image of \(f\)
Example10.3.10.Codomain restriction.
Consider \(\funcdef{f}{\R}{\R}\text{,}\)\(f(x) = x^2\text{.}\) It would be more precise to write \(\funcdef{f}{\R}{\nnegset{\R}}\text{,}\) since \(x^2 \ge 0\) for all \(x \in \R\text{.}\)
Note10.3.11.
If we restrict the codomain all the way down to the image set \(f(X)\text{,}\) the resulting map \(\funcdef{f}{X}{f(X)}\) is always surjective. In particular, if \(\ifuncdef{f}{X}{Y}\) is injective, then by restricting the codomain we can obtain a bijection\(\funcdef{f}{X}{f(X)}\text{.}\)
extension of a function
relative to function \(\funcdef{f}{A}{B}\) and superset \(X \supseteq A\text{,}\) a function \(\funcdef{g}{X}{B}\) so that \(g(a) = f(a)\) for all \(a \in A\)
Note10.3.13.
The condition defining the concept extension function can be more succinctly stated as requiring function \(\funcdef{g}{X}{B}\) with \(A \subseteq X\) satisfy \(\funcres{g}{A} = f\text{.}\)
Example10.3.14.Floor function.
Write \(\funcdef{\flr}{\R}{\Z}\) to mean the floor function: for real input \(x\text{,}\) the output \(\flr(x)\) is defined to be the greatest integer that is less than or equal to \(x\text{.}\) Usually we write
As every integer is less than or equal to itself, we have \(\flr(z) = z\) for every \(z \in \Z\text{.}\) This says that the floor function is an extension of the identity function \(\id_{\Z}\text{.}\)
One of the most common ways to extend a function to a larger domain is to pick an appropriate constant value in the codomain to assign to all “new” inputs in the enlarged domain.
extenstion by zero
relative to function \(\funcdef{f}{A}{Z}\) and superset \(X \supseteq A\text{,}\) where \(Z\) is a set of “numbers” containing a zero element, the extension function \(\funcdef{g}{X}{Z}\) defined by
\begin{equation*}
g(x) =
\begin{cases}
f(x)\text{,} \amp x \in X \text{,} \\
0\text{,} \amp \text{otherwise.}
\end{cases}
\end{equation*}
Example10.3.15.Extending the identity function by zero.
Define \(\funcdef{{\widetilde{\id}}_{\Z}}{\R}{\Z}\) by