Skip to content

Commit

Permalink
Add number of pc-generators to the output
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Brandt committed Aug 28, 2019
1 parent 3d1cf85 commit 9bc1ba2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
9 changes: 7 additions & 2 deletions lib/grppc.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1924,12 +1924,17 @@ InstallMethod( Display,
"for a pc group",
[ IsPcGroup ],
function( G )
local trivialCommutators;
local n, trivialCommutators;
if IsTrivial(G) then
Print("trivial pc-group\n");
return;
fi;
Print("pc-group with relations:\n");
n := Size(Pcgs(G));
if IsOne(n) then
Print("cyclic pc-group with one pc-generator and the relation:\n");
else
Print("pc-group with ", Size(Pcgs(G)), " pc-generators and relations:\n");
fi;
trivialCommutators := PrintPcPresentation( G, false );
if IsAbelian(G) then
Print("all generators commute, the groups is abelian\n");
Expand Down
14 changes: 7 additions & 7 deletions tst/testinstall/grppc.tst
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ gap> START_TEST("grppc.tst");
gap> Display(TrivialGroup(IsPcGroup));
trivial pc-group
gap> Display(CyclicGroup(IsPcGroup, 10));
pc-group with relations:
pc-group with 2 pc-generators and relations:
g1^2 = g2
g2^5 = id
all generators commute, the groups is abelian
gap> Display(SymmetricGroup(IsPcGroup, 3));
pc-group with relations:
pc-group with 2 pc-generators and relations:
g1^2 = id
g2^3 = id
g2^g1 = g2^2
gap> h:=Group((1,2,3,4),(1,2));;
gap> m:=IsomorphismPcGroup(h);;
gap> hh:=Image(m,h);;
gap> Display(hh);
pc-group with relations:
pc-group with 4 pc-generators and relations:
g1^2 = id
g2^3 = id
g3^2 = id
Expand All @@ -34,7 +34,7 @@ gap> g:=WreathProduct(Group((1,2,3),(1,2)),Group((1,2,3,4,5,6,7)));;
gap> i:=IsomorphismPcGroup(g);;
gap> g:=Range(i);;
gap> Display(g);
pc-group with relations:
pc-group with 15 pc-generators and relations:
g1^7 = id
g2^2 = id
g3^2 = id
Expand Down Expand Up @@ -75,7 +75,7 @@ all other pairs of generators commute
gap> u:=Subgroup(g,GeneratorsOfGroup(g){[2..15]});;
gap> n:=Subgroup(g,[g.1]);;
gap> Display(n);
pc-group with relations:
cyclic pc-group with one pc-generator and the relation:
g1^7 = id
all generators commute, the groups is abelian
gap> v:=Normalizer(u,n);;
Expand Down Expand Up @@ -110,7 +110,7 @@ gap> g:=Group((1,15,8,4,14,9)(2,16,7,3,13,10)(5,18,12)(6,17,11),
> (5,6)(7,8)(9,10)(13,14)(15,16),(1,2)(7,8)(13,14),(1,2)(3,4)(5,6),
> (7,8)(9,10)(11,12),(13,14)(15,16)(17,18));;
gap> Display(Image(IsomorphismPcGroup(g)));
pc-group with relations:
pc-group with 8 pc-generators and relations:
g1^2 = id
g2^2 = id
g3^3 = id
Expand Down Expand Up @@ -141,7 +141,7 @@ gap> G := SmallGroup( 144, 183 );;
gap> F := FittingSubgroup( G );;
gap> S := SylowSubgroup( F, 2 );;
gap> Display(Image(IsomorphismPcGroup(S)));
pc-group with relations:
pc-group with 2 pc-generators and relations:
g1^2 = id
g2^2 = id
all generators commute, the groups is abelian
Expand Down

0 comments on commit 9bc1ba2

Please sign in to comment.