[GAP Forum] Converting lists of groups into direct products
Max Horn
max at quendi.de
Sun Jun 23 08:02:30 BST 2013
Dear Nick,
On 21.06.2013, at 17:31, Nick.Gill wrote:
> Hello GAP-forum,
>
> I'm new to the group, so not familiar with the protocol. Forgive me if I'm asking a stupid question and/or omitting vital information...
>
> I have a list of groups - grouplist - and two lists of elements - elist1, elist2 - such that, for each index i, elist1[i] and elist2[i] are members of grouplist[i].
>
> Now I use the command
> D:= DirectProduct(grouplist)
> Here's what I want to do next:
> (1) I would like to convert elist1, elist2 into a format where GAP recognises them as members of D, i.e. I want to convert them from being lists into tuples.
The official way is to use the embedding homomorphisms. Here is a brief example:
gap> g:=Group((1,2,3),(1,2));;
gap> h:=Group((1,2,3,4,5));;
gap> d:=DirectProduct(g,h);
Group([ (1,2,3), (1,2), (4,5,6,7,8) ])
gap> list := [ (1,2), (1,5,4,3,2) ];
gap> e1:=Embedding(d,1);
1st embedding into Group([ (1,2,3), (1,2), (4,5,6,7,8) ])
gap> e2:=Embedding(d,2);
2nd embedding into Group([ (1,2,3), (1,2), (4,5,6,7,8) ])
gap> x := list[1]^e1 * list[2]^e2;
(1,2)(4,8,7,6,5)
This has the advantage of working regardless of how the direct product of your groups is implemented -- as a set of tuples, as a permutation group, a polycyclic group, a finitely presented group or otherwise.
You talk about "tuples". Well, GAP only uses "tuples" to represent elements of direct products if it doesn't know a "better" way (as is the case in the example above). This usually only is the case when you form the direct product of groups of different types, such as the direct product of a permutation group with a finitely presented groups; since you mention that below, I assume you are doing that.
In this situation, there is a different, (undocumented!) way to indeed convert a list of group elements into a "tuple" element, which might be more convenient in your situation: using DirectProductElement. This could look as follows:
gap> G:=SymmetricGroup(4);
Sym( [ 1 .. 4 ] )
gap> F:=FreeGroup(2);
<free group on the generators [ f1, f2 ]>
gap> H:=F/[ F.1^2, F.2^2 ];
<fp group on the generators [ f1, f2 ]>
gap> H:=F/[ F.1^2, F.2^2 ];
<fp group on the generators [ f1, f2 ]>
gap> D:=DirectProduct(G,H);
<group with 4 generators>
gap> elist1:=[G.1, H.1];
[ (1,2,3,4), f1 ]
gap> elist2:=[G.2, H.2];
[ (1,2), f2 ]
gap> g1:=DirectProductElement(elist1);
DirectProductElement( [ (1,2,3,4), f1 ] )
gap> g2:=DirectProductElement(elist2);
DirectProductElement( [ (1,2), f2 ] )
Note that this is undocumented, and thus could change in future versions of GAP (but for a one-time computation, that doesn't matter, of course). Moreover, the code using Embedding also would work in this context, e.g. like this:
gap> g1:=Product(List([1,2], i->elist1[i]^Embedding(D,i)));
DirectProductElement( [ (1,2,3,4), f1 ] )
> (2) Find the subgroup of D generated by elist1 and elist2.
>
> It's (1) that I'm having trouble with - how do I do it?!
>
> The groups in grouplist, incidentally, are either permutation groups or quotients of the free group on 2 letters. I don't know if this fact is important...
Out of completeness, and continuing the example from above:
gap> K:=Subgroup(D, [g1, g2]);
<group with 2 generators>
However, if the factors of the direct product are indeed of different type, as above, then the resulting group object will be of limited use, and computations with it may be much less efficient than theoretically possible, since not that much work went into making computations with such groups efficient.
So depending on what exactly you want to do with that subgroup, it might be more effective to first convert the factors of your direct product into groups of the same type, before computing the direct product and working with it.
>
> All replies appreciated. Warning: I'm extremely ignorant at GAP so have limited capacity to understand complicated responses!
I hope the above was clear enough, but if not, please do not hesitate to ask for clarifications or further examples.
Cheers,
Max
More information about the Forum
mailing list