GAP:IsRetract
This article is about a GAP function.
This GAP function takes as input two groups, both having a common parent group. See other GAP functions like this.
This GAP function outputs a Boolean variable, i.e., it returns either true or false. View other GAP functions with Boolean output
This GAP function is not in-built: you need to copy the code on this page to define the function.
Definition
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 behavior is as follows:
- If the second group is not a subgroup of the first group, the function returns false.
- If the second group is a retract of the first group, i.e., it possesses a normal complement, the function returns true.
- If the second group is a subgroup of the first, but is not a retract, the function returns false.
Method
Code
This code works only for finite groups:
IsRetract := function(G,H)
return(IsSubgroup(G,H) and ForAny(NormalSubgroups(G),L -> Order(L) * Order(H) = Order(G) and IsTrivial(Intersection(H,L))));
end;;