I am looking to define the Weyl group of type $D_n$ as a subgroup of Weyl group of type $B_n$ in the software GAP. In general, one can define these groups separately. For example, let's say
G:=CoxeterGroup("B",4) and H:=CoxeterGroup("D",4) defines the Weyl group of type $B_4$ and $D_4$ respectively. Under this definition, I assume that $H$ is not recognized as a normal subgroup of $G$.
The main thing I want to achieve is to visualize the conjugacy classes in these groups. For example: cc:=ConjugacyClasses(H); will return the list of conjugacy classes in $H$. Now, a command as: ConjugacyClass(G,cc[1]); is not making sense here although theoretically it makes sense. I hope I have been able to explain the problem properly. Thank you in advance for any kind of help.
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:
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.
(The ordering here gives the generators in correspondence to the $D_4$ presentation.)
We verify that the subgroup is D_4:
Thus now you have $D_4$ as a subgroup of $B_4$.