Exercise 21.
Consider the function \(f:\Z \to \Z\) given by \(f(n) = \begin{cases}n+1 \amp \text{ if }n\text{ is even} \\ n-3 \amp \text{ if }n\text{ is odd} . \end{cases}\)
Is \(f\) injective? Prove your answer.
Is \(f\) surjective? Prove your answer.