Solution (source code)

= Solution

The finite-group <Lagrange theorem> states that $|H|$ divides $|G|$ for every subgroup $H\leq G$, since the disjoint left cosets all have size $|H|$. In particular, the order of an element divides the group order.

If $|G|=p$ and $g\ne1$, the <cyclic subgroup> $\langle g\rangle$ has order greater than one and dividing $p$, so it has order $p$. Therefore \b[every group of prime order is cyclic].

Let $G$ now be abelian of order $p^2$. If an element has order $p^2$, it generates $G$, giving $G\cong C_{p^2}$. Otherwise every nonidentity element has order $p$. Choose $a\ne1$ and $b\notin\langle a\rangle$, which is possible because $|\langle a\rangle|=p<p^2$. Commutativity makes
$$
\Phi:C_p\times C_p\to G,\qquad (i,j)\mapsto a^ib^j
$$
a <group homomorphism>. If $a^ib^j=1$ and $j\ne0\pmod p$, choose $t$ with $jt\equiv1\pmod p$. Then $b=(b^j)^t\in\langle a\rangle$, a contradiction. Hence $j=0$ and then $i=0$. The homomorphism is injective and both groups have order $p^2$, so it is an isomorphism. This proves the <abelian group of prime-square order> classification:
$$
\boxed{G\cong C_{p^2}\quad\text{or}\quad C_p\times C_p.}
$$
Here $D_{12}$ denotes the <dihedral group> of order twelve, as specified in the paper: the hexagon's rotation through $\pi/3$ has order six. The possible cycle types in $A_4$ are the identity, three-cycles and double transpositions, of orders one, three and two. It has no element of order six. A <group isomorphism> preserves element orders, so
$$
\boxed{D_{12}\not\cong A_4.}
$$