GAP:IsComplementedNormalSubgroup

Function type
The function takes as input two groups, both of which are subgroups of a common big group, and outputs a boolean (true/false).

Behavior
The function behaves as follows:


 * If the second group is not a subgroup of the first, but they are both subgroups of a common big group, the function returns false.
 * If the second group is a subgroup of the first, but is not a complemented normal subgroup, the function returns false.
 * If the second group is a complemented normal subgroup of the first, the function returns true.
 * If the arguments are not groups, or if they do not live inside a common parent group, GAP returns a NoMethodFound error.

Code
IsComplementedNormalSubgroup := function(G,H) return(IsSubgroup(G,H) and IsNormal(G,H) and ForAny(List(ConjugacyClassesSubgroups(G),Representative),L -> Order(H) * Order(L) = Order(G) and IsTrivial(Intersection(H,L)))); end;;