Left and Right Inverse Mappings Implies Bijection/Proof 2

Theorem
Let $f: S \to T$ be a mapping.

Let $f$ be such that:


 * $\exists g_1: T \to S: g_1 \circ f = I_S$
 * $\exists g_2: T \to S: f \circ g_2 = I_T$

where both $g_1$ and $g_2$ are mappings.

Then $f$ is a bijection.

Proof
Suppose:
 * $\exists g_1: T \to S: g_1 \circ f = I_S$
 * $\exists g_2: T \to S: f \circ g_2 = I_T$

From Injection iff Left Inverse, it follows that $f$ is an injection.

From Surjection iff Right Inverse, it follows that $f$ is a surjection.

So $f$ is both an injection and a surjection and, by definition, therefore also a bijection.