Inputting a group into GAP Can anyone tell me whether or not it is possible to input the following 2-group into GAP? The question is the order of element $a$ is $2^m$, where $m$ could be any integer $\geq 2$. For example, I input $a*b*a$, then the system returns $b*a^{2+2^{m-1}}$.    
$G_1$=$\langle a,b$
$|a^{2^m}$=$b^{2^n}$=$1,\ b^{-1}ab=a^{1+{2^{m-1}}}\rangle$.
Thanks in advance!
 A: You can't have a "generic" group where m is a symbolic variable, if that's what you mean. OTOH, you can assign a value to m and then have a relator of the form a^m, and even write a GAP function which will take an integer argument m and return the group given by the presentation above for a particular m.
In your example, this may work as follows:
gap> mygroup:=function(m,n)
> local F, gens, rels, a, b;
> F:=FreeGroup("a","b");
> gens:=GeneratorsOfGroup(F);
> a:=gens[1]; b:=gens[2];
> rels:=[a^(2^m), b^(2^n), b^-1*a*b*a^(-1-(2^(m-1)))];
> return F/rels;
> end;
function( m, n ) ... end
gap> G:=mygroup(3,3);
<fp group on the generators [ a, b ]>
gap> Size(G);
64
gap> IdGroup(G);
[ 64, 3 ]
gap> G:=mygroup(4,2);
<fp group on the generators [ a, b ]>
gap> Size(G);
64
gap> IdGroup(G);
[ 64, 27 ]

Most likely, you may want then to convert this group into a polycyclic group that uses the polycyclic presentation for element arithmetic. For 2-groups, GAP would operate with pc groups work much much faster than with fp groups. For example, compare
gap> G:=mygroup(10,2);
<fp group on the generators [ a, b ]>
gap> Size(G);
4096
gap> ConjugacyClassesSubgroups(G);;time;
14709

with 
gap> G:=mygroup(10,2);
<fp group on the generators [ a, b ]>
gap> H:=Image(IsomorphismPcGroup(G));
Group([ f1*f2*f4*f5*f6*f7*f8*f9*f10*f11, f1 ])
gap> ConjugacyClassesSubgroups(H);;time;
934

where the last calculation is about 15 times faster.

P.S. Just rewriting my former comments with some more details to remove this from the unanswered queue.
