Skip to content

Commit

Permalink
ENHANCE: Use PseudoRandom with radius instead of ad-hoc construction.
Browse files Browse the repository at this point in the history
Changes to manual examples that list presentations obtained through random

REBASE: Further manual examples
  • Loading branch information
hulpke committed Feb 8, 2018
1 parent 50b1fbb commit 22ec553
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion doc/ref/grpfp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ gap> f := FreeGroup( "a", "b" );
gap> g := f / [ f.1^2, f.2^3, (f.1*f.2)^5 ];
<fp group on the generators [ a, b ]>
gap> h := IsomorphismPermGroup( g );
[ a, b ] -> [ (1,2)(3,5), (2,3,4) ]
[ a, b ] -> [ (1,2)(4,5), (2,3,4) ]
gap> u:=Subgroup(g,[g.1*g.2]);;rt:=RightTransversal(g,u);
RightTransversal(<fp group of size 60 on the generators
[ a, b ]>,Group([ a*b ]))
Expand Down
24 changes: 9 additions & 15 deletions lib/grp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4169,12 +4169,14 @@ DeclareAttribute( "IsomorphismFpGroup", IsGroup );
## <Example><![CDATA[
## gap> SetInfoLevel( InfoFpGroup, 1 );
## gap> iso := IsomorphismFpGroupByGenerators( g, [ (1,2), (1,2,3,4,5) ] );
## #I the image group has 2 gens and 5 rels of total length 39
## #I the image group has 2 gens and 4 rels of total length 50
## [ (1,2), (1,2,3,4,5) ] -> [ F1, F2 ]
## gap> fp := Image( iso );
## <fp group of size 120 on the generators [ F1, F2 ]>
## gap> RelatorsOfFpGroup( fp );
## [ F1^2, F2^5, (F2^-1*F1)^4, (F1*F2^-1*F1*F2)^3, (F1*F2^2*F1*F2^-2)^2 ]
## [ F1^2, (F2*F1*F2^-2*F1)^3,
## F2*F1*F2^-1*(F1*F2)^2*F2^2*(F1*F2^-1)^2*F2^-1*F1,
## (F2*F1*F2^-1*F1)^2*F2^-1*F1*F2^2*F1*F2^-2*F1*F2*F1 ]
## ]]></Example>
## <P/>
## The main task of the function
Expand All @@ -4201,9 +4203,9 @@ DeclareAttribute( "IsomorphismFpGroup", IsGroup );
## (1,12)(2,11)(3,6)(4,8)(5,9)(7,10) ])
## gap> gens := GeneratorsOfGroup( M12 );;
## gap> iso := IsomorphismFpGroupByGenerators( M12, gens );;
## #I the image group has 3 gens and 20 rels of total length 464
## #I the image group has 3 gens and 20 rels of total length 554
## gap> iso := IsomorphismFpGroupByGenerators( M12, gens );;
## #I the image group has 3 gens and 19 rels of total length 491
## #I the image group has 3 gens and 19 rels of total length 427
## ]]></Example>
## <P/>
## Also in the case of a permutation group <A>G</A>, the function
Expand Down Expand Up @@ -4252,7 +4254,7 @@ DeclareAttribute( "IsomorphismFpGroup", IsGroup );
## #I the image group has 3 gens and 11 rels of total length 92
## gap> iso := IsomorphismFpGroupByGenerators( M12, gens :
## > method := "fast" );;
## #I the image group has 3 gens and 179 rels of total length 4099
## #I the image group has 3 gens and 136 rels of total length 3215
## ]]></Example>
## <P/>
## Though the option <C>method := "regular"</C> is only checked in the case
Expand All @@ -4274,7 +4276,7 @@ DeclareAttribute( "IsomorphismFpGroup", IsGroup );
## [ [ 0, 1, 0, 0, 0 ], [ 0, 0, 1, 0, 0 ], [ 0, 0, 0, 1, 0 ],
## [ 1, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 1 ] ] ]
## gap> iso := IsomorphismFpGroupByGenerators( G, gens );;
## #I the image group has 2 gens and 9 rels of total length 94
## #I the image group has 2 gens and 10 rels of total length 126
## gap> iso := IsomorphismFpGroupByGenerators( G, gens :
## > method := "regular");;
## #I the image group has 2 gens and 6 rels of total length 56
Expand All @@ -4286,15 +4288,7 @@ DeclareAttribute( "IsomorphismFpGroup", IsGroup );
## , 0, 0, 0, 1 ] ] ]->[ F1, F2 ]>
## gap> ConstituentsCompositionMapping(iso);
## [ <action isomorphism>,
## [ (2,3,5,9,16,29)(4,7,13,24,19,32)(6,11,20,34,40,57)(8,15,28,46,42,
## 59)(10,18,25,41,49,67)(12,22,37,53,48,66)(14,26,31)(17,30,35,
## 50,58,38)(21,36,33)(23,39,56)(27,44,61,72,43,60)(45,62,51,68,
## 54,70)(47,64,73)(52,69)(55,71,75,78,77,76)(65,74),
## (1,2,4,8)(3,6,12,23)(5,10,19,33)(7,14,27,45)(9,17,18,31)(11,21,
## 16,28)(13,25,42,57)(20,35,51,67)(22,38,55,70)(24,40,26,43)(29,
## 37,54,39)(30,47,65,68)(32,48)(34,49,36,52)(41,58,56,61)(44,50,
## 53,64)(46,63,69,59)(60,66,75,79)(62,73,72,77)(71,76,80,74)
## ] -> [ F1, F2 ] ]
## [ (2,3,4)(5,6)(8,9,10), (1,2,3,5)(6,7,8,9) ] -> [ F1, F2 ] ]
## ]]></Example>
## <P/>
## Since &GAP; cannot decompose elements of a matrix group into generators,
Expand Down
1 change: 0 additions & 1 deletion lib/grpfp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3723,7 +3723,6 @@ local fgens,grels,max,gens,t,Attempt;
gens:=Concatenation([t,
#pseudorandom element - try if it works
PseudoRandom(G:radius:=Random(2,3))],
#Product([1..Random([2,3])],i->Random(gens)^Random([1,-1]))],
Filtered(gens,j->UnderlyingElement(j)<>UnderlyingElement(t)));

# recursive search (via smaller and smaller partitions) for a finite index
Expand Down

0 comments on commit 22ec553

Please sign in to comment.