Surjection iff Right Inverse

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.

This mapping $$g: T \to S$$ is called a right inverse.

Proof

 * Assume $$\exists g: T \to S: f \circ g = I_S$$.

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

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

Note that the existence of such a $$g$$ requires that $$S \ne \varnothing$$.


 * Now, assume $$f$$ is a surjection. Then:

$$\forall y \in T: f^{-1} \left({\left\{{y}\right\}}\right) \ne \varnothing$$

Let $$f^{-1} \left({\left\{{y}\right\}}\right) = X_y = \left\{{x_{y_1}, x_{y_2}, \ldots}\right\}$$

Using the Axiom of Choice, for each $$y \in T$$ we can choose any of the elements $$x_{y_1}, x_{y_2}, \ldots$$ to be identified as $$x_y$$, and thereby define:

$$g: T \to S: g \left({y}\right) = x_y$$

Then we see that $$f \circ g \left({y}\right) = f \left({x_y}\right) = y$$

and thus $$f \circ g = I_T$$.