[proofplan]
Choose a [group isomorphism](/page/Group%20Isomorphism) $\varphi: G \to H$. Its bijectivity immediately gives equality of cardinalities, while its homomorphism property transfers products and hence commutativity. Cyclicity is transferred by observing that an isomorphism carries a generated subgroup onto the subgroup generated by the image of the generator. Finally, element orders are preserved by isomorphisms, so $\varphi$ restricts to a bijection between the elements of order $n$ in $G$ and the elements of order $n$ in $H$ for each positive integer $n$.
[/proofplan]
[step:Choose an isomorphism and compare the underlying cardinalities]
Since $G \cong H$, choose a group isomorphism
\begin{align*}
\varphi: G \to H.
\end{align*}
By definition, $\varphi$ is a bijective [group homomorphism](/page/Group%20Homomorphism). Since $\varphi$ is a bijection between the underlying sets of $G$ and $H$, the two underlying sets have the same cardinality:
\begin{align*}
|G| = |H|.
\end{align*}
[/step]
[step:Transfer commutativity across the isomorphism]
Assume first that $G$ is abelian. Let $a,b \in H$. Since $\varphi$ is surjective, choose $x,y \in G$ such that $\varphi(x)=a$ and $\varphi(y)=b$. Using that $\varphi$ is a homomorphism and that $G$ is abelian, we obtain
\begin{align*}
ab = \varphi(x)\varphi(y) = \varphi(xy) = \varphi(yx) = \varphi(y)\varphi(x) = ba.
\end{align*}
Thus $H$ is abelian.
Conversely, assume that $H$ is abelian. Let $x,y \in G$. Since $\varphi$ is a homomorphism and $H$ is abelian,
\begin{align*}
\varphi(xy) = \varphi(x)\varphi(y) = \varphi(y)\varphi(x) = \varphi(yx).
\end{align*}
Since $\varphi$ is injective, $xy=yx$. Therefore $G$ is abelian. Hence $G$ is abelian if and only if $H$ is abelian.
[guided]
We prove both directions because an invariant must be preserved and reflected by the isomorphism.
First assume that $G$ is abelian. To prove that $H$ is abelian, take arbitrary elements $a,b \in H$. The only way to use commutativity in $G$ is to pull $a$ and $b$ back to elements of $G$. Since $\varphi: G \to H$ is surjective, there exist $x,y \in G$ with $\varphi(x)=a$ and $\varphi(y)=b$. Because $\varphi$ is a group homomorphism, it preserves products:
\begin{align*}
\varphi(xy) = \varphi(x)\varphi(y).
\end{align*}
Since $G$ is abelian, $xy=yx$. Therefore
\begin{align*}
ab = \varphi(x)\varphi(y) = \varphi(xy) = \varphi(yx) = \varphi(y)\varphi(x) = ba.
\end{align*}
Since $a$ and $b$ were arbitrary elements of $H$, this proves that $H$ is abelian.
Now assume that $H$ is abelian. Let $x,y \in G$. Applying the homomorphism property to the two products $xy$ and $yx$ gives
\begin{align*}
\varphi(xy) = \varphi(x)\varphi(y)
\end{align*}
and
\begin{align*}
\varphi(yx) = \varphi(y)\varphi(x).
\end{align*}
Because $H$ is abelian, $\varphi(x)\varphi(y)=\varphi(y)\varphi(x)$. Hence
\begin{align*}
\varphi(xy)=\varphi(yx).
\end{align*}
Finally, $\varphi$ is injective, so equality of the images forces equality of the original elements:
\begin{align*}
xy=yx.
\end{align*}
Since $x$ and $y$ were arbitrary elements of $G$, the group $G$ is abelian. Thus $G$ is abelian if and only if $H$ is abelian.
[/guided]
[/step]
[step:Transfer cyclicity by carrying generators to generators]
Assume first that $G$ is cyclic. Choose $g \in G$ such that $G=\langle g\rangle$. Applying [citetheorem:9504] to the isomorphism $\varphi: G \to H$ and the subset $\{g\}\subset G$, we get
\begin{align*}
H = \varphi(G) = \varphi(\langle g\rangle) = \langle \varphi(g)\rangle.
\end{align*}
Thus $H$ is cyclic.
Conversely, assume that $H$ is cyclic. Since $\varphi$ is an isomorphism, its inverse
\begin{align*}
\varphi^{-1}: H \to G
\end{align*}
is a group isomorphism. Applying the previous paragraph to $\varphi^{-1}$ shows that $G$ is cyclic. Therefore $G$ is cyclic if and only if $H$ is cyclic.
[/step]
[step:Restrict the isomorphism to elements of each fixed finite order]
Fix $n \in \mathbb{N}$. Define the order-$n$ subsets
\begin{align*}
E_G(n) := \{g \in G : \operatorname{ord}(g)=n\}
\end{align*}
and
\begin{align*}
E_H(n) := \{h \in H : \operatorname{ord}(h)=n\}.
\end{align*}
By [citetheorem:9503], applied to the isomorphism $\varphi: G \to H$ and an arbitrary element $g \in G$, we have
\begin{align*}
\operatorname{ord}(\varphi(g))=\operatorname{ord}(g).
\end{align*}
Hence $g \in E_G(n)$ if and only if $\varphi(g)\in E_H(n)$.
Therefore the restriction
\begin{align*}
\varphi|_{E_G(n)}: E_G(n) \to E_H(n)
\end{align*}
is well-defined. It is injective because $\varphi$ is injective. It is surjective because if $h \in E_H(n)$, then surjectivity of $\varphi$ gives $g \in G$ with $\varphi(g)=h$, and the order-preservation equality gives
\begin{align*}
\operatorname{ord}(g)=\operatorname{ord}(\varphi(g))=\operatorname{ord}(h)=n.
\end{align*}
Thus $g \in E_G(n)$ and $\varphi|_{E_G(n)}(g)=h$. Hence $\varphi|_{E_G(n)}$ is a bijection, so
\begin{align*}
|E_G(n)|=|E_H(n)|.
\end{align*}
Since $n \in \mathbb{N}$ was arbitrary, the number of elements of each finite order agrees for $G$ and $H$.
[/step]