Surjection iff Right Inverse/Proof 1

Theorem
A mapping $f: S \to T, S \ne \varnothing$ is a surjection iff:
 * $\exists g: T \to S: f \circ g = I_T$

where:
 * $g$ is a mapping
 * $I_T$ is the identity mapping on $T$.

That is, if $f$ has a right inverse.

Proof
Assume $\exists g: T \to S: f \circ g = I_T$.

From Identity Mapping is Surjection, $I_T$ is surjective, so $f \circ g$ is surjective.

So from Surjection if Composite is Surjection, $f$ is a surjection.

Note that the existence of such a $g$ requires that $S$ is non-empty.

Now, assume $f$ is a surjection.

Consider the family of non-empty sets $\left\{{f^{-1} \left({y}\right)}\right\}_{y \in T}$ where $f^{-1} \left({y}\right)$ denotes the preimage of $y$ under $f$.

Using the axiom of choice, there exists a mapping $g: T \to S$ such that $g \left({y}\right) \in f^{-1} \left({y}\right)$ for all $y \in T$.


 * SurjectionIffRightInverse.png

That is, $\left({f \circ g}\right) \left({y}\right) = y$, as desired.