Defining the Weyl group of type $D_n$ as a subgroup of Weyl group of type $B_n$ in GAP

Solution 1:

GAP3 is a 20 year old version of the system, but it is easy to create the Coxeter/Weyl groups in GAP4 from the presentation. (The next release of GAP4 also will contain a function WeylGroupFp that does this directly.)

Basically, two different finitely presented groups do not have any connection. You will have to create the second group thus as a subgroup of the first.

Thus, let's start with the group of type B:

f:=FreeGroup("a","b","c","d");
rels:=ParseRelators(f,"a2,b2,c2,d2,(ab)4,[a,c],[a,d],(bc)3,[b,d],(cd)3");
g:=f/rels;

We now could look for normal subgroups of the right order, but (if I recall correctly), the $D_n$ in $B_n$ is generated by the generators $2,\ldots,n$ and a conjugate of the second by the inverse of the first.

u:=SubgroupNC(g,[g.2,g.2^(g.1^-1),g.3,g.4]);

(The ordering here gives the generators in correspondence to the $D_4$ presentation.)

We verify that the subgroup is D_4:

isofp:=IsomorphismFpGroupByGenerators(u,GeneratorsOfGroup(u));
RelatorsOfFpGroup(Range(isofp));
# returns:
[ F1^2, F2^2, F3^2, F4^2, (F4*F1)^2, (F2*F1)^2, (F4*F2)^2, (F3*F1)^3,  (F4*F3)^3, (F3*F2)^3 ]

Thus now you have $D_4$ as a subgroup of $B_4$.