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: f \left({x}\right) = y_1$

Let $Z = \left\{{a, b}\right\}$.

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


 * $h_1 \left({y}\right) = a: y \in Y$


 * $h_2 \left({y}\right) = \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.