# How to input presentations of large p-group in GAP

I am trying to find the best way to input large p-groups into GAP. I have tried looking at Print(GapInputPcGroup(G,"g")); but I would like to know is it possible to avoid telling GAP by hand, the consequences of a commutator/conjugate relation(perhaps I need to use some sort of collector?).

To make the question concrete: As an example how can I best input the group below into GAP by hand: $G=\langle a,b | a^{3^{5}}=1,b^{3^{3}}=1, b^{a}=ba^{9} \rangle$

Can I just give GAP the commutator or conjugacy relation between $b,a$ ?

For your reference, I can get this group in a different way and then GapInputPcGroup gives:

Print(GapInputPcGroup(G,"g"));
g:=function()
local g1,g2,g3,g4,g5,g6,g7,g8,r,f,g,rws,x;
f:=FreeGroup(IsSyllableWordsFamily,8);
g:=GeneratorsOfGroup(f);
g1:=g[1];
g2:=g[2];
g3:=g[3];
g4:=g[4];
g5:=g[5];
g6:=g[6];
g7:=g[7];
g8:=g[8];
rws:=SingleCollector(f,[ 3, 3, 3, 3, 3, 3, 3, 3 ]);
r:=[
[1,g3],
[2,g4],
[3,g5],
[4,g6],
[5,g7],
[7,g8],
];
for x in r do SetPower(rws,x[1],x[2]);od;
r:=[
[2,1,g5],
[4,1,g7],
[6,1,g8],
[3,2,g7^2*g8^2],
[5,2,g8^2],
[4,3,g8],
];
for x in r do SetCommutator(rws,x[1],x[2],x[3]);od;
return GroupByRwsNC(rws);
end;
g:=g();
Print("#I A group of order ",Size(g)," has been defined.\n");
Print("#I It is called g\n");


You can do this by first defining the finitely presented group and then computing a homomorphism onto its largest $p$-quotient, which in this case is isomorphic to the group itself. The image of the homomrphism is what you are trying to define.

gap> F:=FreeGroup(2);;
gap> a:=F.1;; b:=F.2;;
gap> rels := [a^(3^5), b^(3^5), b^a/(b*a^9)];;
gap> G := F/rels;;
gap> Size(G);
59049
gap> hom := EpimorphismPGroup(G,3);;
gap> Size(Image(hom));
59049

• Does Gap also check whether the representation determines the (finite) group $G$ uniquely ? – Peter Dec 15 '16 at 16:50
• I am not sure exactly what you are asking. In this example I checked explicitly that the finitely presented group and the $p$-group have the same orders. In general, EpimorphismPGroup computes the largest finite $p$-quotient of the finitely presented group provided that it exists. If there are infinitely large $p$-quotients then I think it gives up at class $1000$ if it gets that far. – Derek Holt Dec 15 '16 at 18:01