Left and Right Coset Spaces are Equivalent/Proof 2

Theorem
Let $\left({G, \circ}\right)$ be a group.

Let $H$ be a subgroup of $G$.

Let:
 * $x H$ denote the left coset of $H$ by $x$
 * $H y$ denote the right coset of $H$ by $y$.

Then:
 * $\left|{\left\{{x H: x \in G}\right\}}\right| = \left|{\left\{{H y: y \in G}\right\}}\right|$

Proof
Let $G$ be a group and let $H \le G$.

Consider the mapping $\phi$ from the left coset space to the right coset space defined as:


 * $\forall g \in G: \phi \left({g H}\right) = H g^{-1}$

We need to show that $\phi$ is a bijection.

First we need to show that $\phi$ is well-defined.

That is, that $a H = b H \implies \phi \left({a H}\right) = \phi \left({b H}\right)$.

Suppose $a H = b H$.

But $a^{-1} \left({b^{-1}}\right)^{-1} = a^{-1} b \in H$ as $a H = b H$.

So $H a^{-1} = H b^{-1}$ and $\phi$ is well-defined.

Next we show that $\phi$ is injective:

Suppose $\exists x, y \in G: \phi \left({x H}\right) = \phi \left({y H}\right)$.

Then $H x^{-1} = H y^{-1}$, so $x^{-1} = e_G x^{-1} = h y^{-1}$ for some $h \in H$.

Thus $h = x^{-1} y \implies h^{-1} = y^{-1} x$.

As $H$ is a subgroup, $h^{-1} \in H$.

Thus:
 * $y^{-1} x \in H$

So by Left Cosets are Equal iff Product with Inverse in Subgroup:
 * $x H = y H$

Thus $\phi$ is injective.

Next we show that $\phi$ is surjective:

Let $H x$ be a right coset of $H$ in $G$.

Since $x = \left({x^{-1}}\right)^{-1}$, $H x = \phi \left({x^{-1} H}\right)$ and so $\phi$ is surjective.

Thus $\phi$ constitutes a bijection from the left coset space to the right coset space, and the result follows.