Solution (source code)

= Solution

For a <subgroup> $H\leq G$ and $g\in G$, the left and right <cosets> are $gH=\{gh:h\in H\}$ and $Hg=\{hg:h\in H\}$. A <normal subgroup> satisfies $gHg^{-1}=H$ for every $g$. Multiplying this set equality on the right by $g$ gives
$$
\boxed{gH=Hg\quad\text{for every }g\in G.}
$$
Conversely this equality implies $gHg^{-1}=H$, so it is an equivalent definition of normality.