Surjection iff Right Inverse/Proof 2

Theorem
A mapping $f: S \to T, S \ne \varnothing$ is a surjection :
 * $\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
Take the result Condition for Composite Mapping on Right:

Let $A, B, C$ be sets.

Let $f: B \to A$ and $g: C \to A$ be mappings.

Then:
 * $\operatorname{Im} \left({g}\right) \subseteq \operatorname{Im} \left({f}\right)$


 * $\exists h: C \to B$ such that $h$ is a mapping and $f \circ h = g$
 * $\exists h: C \to B$ such that $h$ is a mapping and $f \circ h = g$

Let $C = A = T$, let $B = S$ and let $g = I_T$.

Then the above translates into:


 * $\operatorname{Im} \left({I_T}\right) \subseteq \operatorname{Im} \left({f}\right)$


 * $\exists g: T \to S$ such that $g$ is a mapping and $f \circ g = I_T$
 * $\exists g: T \to S$ such that $g$ is a mapping and $f \circ g = I_T$

But we know that $\operatorname{Im} \left({f}\right) \subseteq T = \operatorname{Im} \left({I_T}\right)$.

So by definition of set equality, the result follows.