Left and Right Inverses of Mapping are Inverse Mapping/Proof 1

Theorem
Let $f: S \to T$ be a mapping 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$

Then:
 * $g_1 = g_2 = f^{-1}$

where $f^{-1}$ is the inverse of $f$.

Proof
From Left and Right Inverse Mappings Implies Bijection it follows that $f$ is a bijection.

It follows from Bijection Composite with Inverse that $g_1 = g_2 = f^{-1}$.