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.
IsomorphismPcGroup
here. For 2-groups, GAP would operate with pc groups work much much faster than with fp groups. – Olexandr Konovalov Mar 24 '14 at 10:31m
and then have a relator of the forma^m
, and even write a GAP function which will take an integer argumentm
and return the group given by the presentation above for a particularm
. – Olexandr Konovalov Mar 24 '14 at 14:44