I'm new to GAP and I'm not sure if MSE is the correct place to ask this. Let $G$ be a group with subgroups $H$ and $K$. How do I find input a command to find the subgroup generated by them both i.e. $\langle H, K \rangle$?
Asked
Active
Viewed 455 times
1 Answers
1
Using Group(..) in conjunction with GeneratorsOfGroup(..) seems possible, although I'm not sure if this is the best way. As a toy example:
gap> G:=SymmetricGroup(100);
Sym( [ 1 .. 100 ] )
Starting with a large group
gap> H:=Subgroup(G,[Random(G),Random(G),Random(G),Random(G)]);
<permutation group with 4 generators>
gap> K:=Subgroup(G,[Random(G),Random(G),Random(G),Random(G)]);
<permutation group with 4 generators>
and two subgroups. We compute generators:
gap> gH:=GeneratorsOfGroup(H);;
gap> gK:=GeneratorsOfGroup(K);;
And take the group generated by the union of their generators:
gap> HJoinK:=Group(Union(gH,gK));
<permutation group with 8 generators>
Rebecca J. Stones
- 26,845
-
One may need to take care that the resulting group is recognised as a subgroup in appropriate subgroups and their supergroup. Look at closures of subgroups here: https://www.gap-system.org/Manuals/doc/ref/chap39.html#X7B855B0485C3C6C5 – Olexandr Konovalov Aug 28 '17 at 12:10