Left Inverse and Right Inverse is Inverse

Theorem
Let $\struct {S, \circ}$ be a monoid with identity element $e_S$.

Let $x \in S$ such that $x$ has both a left inverse and a right inverse. That is:


 * $\exists x_L \in S: x_L \circ x = e_S$
 * $\exists x_R \in S: x \circ x_R = e_S$

Then $x_L = x_R$, that is, $x$ has an inverse.

Furthermore, that element is the only inverse (both right and left) for $x$

Proof
We note that as $\struct {S, \circ}$ is a monoid, $\circ$ is associative by definition.

Its uniqueness comes from Inverse in Monoid is Unique.