Injection iff Left Inverse/Proof 3

Proof
Let $f: S \to T$ be an injection.

Then $f$ is a one-to-many relation.

By Inverse of Many-to-One Relation is One-to-Many, $f^{-1}: T \to S$ is many-to-one.

By Many-to-One Relation Extends to Mapping, there is a Mapping $g: T \to S$ such that $f^{-1} \subseteq g$.

Let $\left({x, y}\right) \in g \circ f$.

Then:
 * $\exists z \in T: \left({x, z}\right) \in f, \left({z, y}\right) \in g$

Since $\left({x, z}\right) \in f$:
 * $\left({z, x}\right) \in f^{-1} \subseteq g$

Since $\left({z, y}\right) \in g$, $\left({z, x}\right) \in g$ and $g$ is a mapping:
 * $x = y$

so:
 * $\left({x, y}\right) \in I_S$

So we see that:
 * $g \circ f \subseteq I_S$

Let $x \in S$.

Then:
 * $\left({x, f \left({x}\right)}\right) \in f$

and:
 * $\left({f \left({x}\right), x}\right) \in f^{-1} \subseteq g$

So:
 * $\left({x, x}\right) \in g \circ f$

Thus:
 * $I_S \subseteq g \circ f$.

By definition of set equality:
 * $I_S = g \circ f$