Localization of Ring is Unique

Theorem
Let $A$ be a commutative ring with unity.

Let $S \subseteq A$ be a multiplicatively closed subset.

Let $(A_S,\iota)$, $(\tilde A_S,\tilde \iota)$ both satisfy the definition of the localisation of $A$ at $S$.

Then there is a canonical isomorphism $\phi : A_S \to \tilde A_S$.

Proof
By the definition of localisation, there are unique homorphism $g : A_S \to \tilde A_S$, $h : \tilde A_S \to A_S$ such that $h \circ \iota = \tilde \iota$ and $ g\circ \tilde \iota = \iota$.

Therefore,


 * $\tilde \iota = h\circ \iota = h \circ (g \circ \tilde \iota) = (h \circ g) \circ \tilde \iota$

The identity also satisfies this equality (that is, $\tilde \iota = (h \circ g) \circ \tilde \iota$).

Therefore by the uniqueness of $h$ and $g$ we have $h \circ g = \operatorname{id}_{\tilde A_S}$.

Similarly we have that $g \circ h = \operatorname{id}_{A_S}$.

Therefore by (!) $g = \phi$ is the required isomorphism.

Does the result: $g : A \to B$ is an isomorphism iff there exists $h : B \to A$ such that $hg = \operatorname{id}_A$, $gh = \operatorname{id}_B$ exist? Shame to duplicate.
 * Not directly, but there does exist the same result as the definition for Definition:Inverse of Bijection which you can craft it around from the definition of a homomorphism as a bijection that has the morphism property.