# How to determine if a group H is a normal subgroup of group G?

A subgroup $$H$$ of the group $$G$$ is normal group in $$G$$ if and only if $$\displaystyle ghg^{-1}\in H$$ for all $$\displaystyle g\in G$$ and $$\displaystyle h\in H$$. How to use MMA to know the group $$H$$ is a normal group of group $$G$$? Such as:

G = SymmetricGroup[6];
H = AlternatingGroup[6];

• g = GroupElements[SymmetricGroup[6]]; h = GroupElements[AlternatingGroup[6]]; conj[x_] := PermutationProduct[#, x, InversePermutation[#]] & /@ g Brute fprcing: Union[Flatten[conj /@ h]] == Sort[h] yields True May 16 at 8:43
• @ubpdqn Yes, I note your solution here. But RandomSample[Sort[GroupElements[AlternatingGroup[6]]]]===GroupElements[AlternatingGroup[6]] will return False. You need a parameter Less like my answer in following. And I use the PermutationReplace to get the conjugate is more concise than yours. :)
– yode
May 16 at 9:10
• Not sure I understand but I'll accept your point May 16 at 9:12

IsNormalQ[H_, G_] := Sort[DeleteDuplicates[Catenate[
Outer[PermutationReplace, GroupElements[H],
Complement[GroupElements[G], GroupElements[H]]]]], Less] === GroupElements[H]


Or little concise, but sometimes it will be slower:

IsNormalQ[H_, G_] := ContainsExactly[
Catenate[Outer[PermutationReplace, GroupElements[H],
Complement[GroupElements[G], GroupElements[H]]]],GroupElements[H]]