Injection has Surjective Left Inverse Mapping/Proof 1

Proof
Since $S$ is non-empty, we can choose an element $x \in S$.

Since $f$ is an injection, for each $t \in \operatorname{Im} \left({f}\right)$ there exists a unique $s \in S$ such that:
 * $f \left({s}\right) = t$

Thus by Law of Excluded Middle there exists a well-defined mapping $T \to S$ given by:
 * $\displaystyle g \left({t}\right) =

\begin{cases} s & : \left({t \in \operatorname{Im} f}\right) \land \left({f \left({s}\right) = t}\right) \\ x & : t \notin \operatorname{Im} f \end{cases}$

By construction, for any given $s \in S$, the element $f \left({s}\right)$ maps to $s$ under $g$.

Therefore $g: T \to S$ is a surjection.