Subgroup generated by two subgroups in GAP

456 Views Asked by At

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$?

1

There are 1 best solutions below

1
On

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>