Mapping/Examples/(x-2)^2+1 on Natural Numbers

Example of Mapping which is neither Injective nor Surjective
Let $f: \N \to \N$ be the mapping defined on the set of natural numbers as:
 * $\forall x \in \Z: \map f x = \paren {x - 2}^2 + 1$

Then $f$ has an infinite image set, but is neither a surjection nor an injection.

Proof
We have that:
 * $17 = \paren {6 - 2}^2 + 1$

and so $17 = \map f 6$.

That is:
 * $17 \in \Img f$

Let $y \in \Img f$ such that $y \ge 17$.

Then:


 * $\exists x \in \N: y = \map f x = \paren {x - 2}^2 + 1$

such that $x > 6$.

Now consider:

That is for every $y \in \Img f$ such that $y \ge 17$, there exists $y' \in \Img f$ such that $y' > 5$.

Thus $f$ is unbounded above.

It follows that $\Img f$ is an infinite set.

For all $x \in \N$ we have that $\paren {x - 2}^2 \ge 0$.

Thus:
 * $\paren {x - 2}^2 + 1 \ge 1$

Consider the natural number $y = 0$.

Then there exists no $x \in \N$ such that $\map f x = y$.

Thus, by definition, $f$ is not a surjection.

Let $x_1 = -2, x_2 = 6$. Then:

while:

Thus we have found $x_1, x_2 \in \Dom f$ such that $x_1 \ne x_2$ but that $\map f {x_1} = \map f {x_2}$.

Thus:

Thus by definition $f$ is not an injection.