Surjection iff Right Cancellable/Sufficient Condition/Proof 1

Proof
Suppose $f$ is a mapping which is not surjective.

Then:
 * $\exists y_1 \in Y: \neg \exists x \in X: \map f x = y_1$

Let $Z = \set {a, b}$.

Let $h_1$ and $h_2$ be defined as follows.


 * $\map {h_1} y = a: y \in Y$


 * $\map {h_2} y = \begin {cases}

a & : y \ne y_1 \\ b & : y = y_1 \end {cases}$

Thus we have $h_1 \ne h_2$ such that $h_1 \circ f = h_2 \circ f$.

Therefore $f$ is not right cancellable.

It follows from the Rule of Transposition that if $f$ is right cancellable, then $f$ must be surjective.