Given function $f:\mathbb Z \to \mathbb Z$ defined by $f(n) = n - 6$
$\mathbb Z$ in this case is the set of integers.
Suppose for $x_1$, $x_2 \in \mathbb Z$, we have $f(x_1) = f(x_2)$.
This means that $x_1 - 6 = x_2 - 6$
Hence $x_1 = x_2$. By the law of contrapositive, $f$ is 1-1 (injective)
I understand that the contrapositive of the preposition is generally the opposite (I think) but when proving 1-1 you want to prove that $x_1 = x_2$ and $f(x_1) = f(x_2)$ This proves that they are equal, why would you want to prove this? it violates 1-1? I feel like I'm missing the point of contrapositive proof..