Surjection/Examples/Half Even Zero Odd

From ProofWiki
Jump to navigation Jump to search

Example of Surjection

Let $f: \Z \to \Z$ be the mapping defined on the set of integers as:

$\forall x \in \Z: \map f x = \begin{cases} \dfrac x 2 & : x \text { even} \\ 0 & : x \text { odd} \end{cases}$

Then $f$ is a surjection.


Proof

Let $y \in \Z$ be an integer.

Consider the integer $x = 2 y$.

Then:

$\exists x \in \Z: y = \dfrac x 2$

That is:

$x = 2 y$

Thus $f$ is a surjection by definition.

$\blacksquare$


Sources