Skip to content

Commit

Permalink
ENHANCE: Allow for different presentations for better rewriting
Browse files Browse the repository at this point in the history
Added IsomorphismFpGroupForRewriting and method for alternating groups.
  • Loading branch information
hulpke committed Apr 8, 2019
1 parent b24901e commit 256316b
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 50 deletions.
2 changes: 1 addition & 1 deletion doc/ref/groups.xml
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ see <Cite Key="BJR87"/>.
<Heading>2-Cohomology</Heading>

<#Include Label="TwoCohomologyGeneric">
<#Include Label="PresentationCocycle">
<#Include Label="FpGroupCocycle">

Also see Section <Ref Sect="2-Cohomology and Extensions"/> for operations and
methods specific for Pc groups.
Expand Down
9 changes: 8 additions & 1 deletion lib/gpfpiso.gi
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,11 @@ function(g,str,N)
# we know sf is simple
SetIsSimpleGroup(sf,true);
IsNaturalAlternatingGroup(sf);
a:=IsomorphismFpGroup(sf:noassert);
if ValueOption("rewrite")=true then
a:=IsomorphismFpGroupForRewriting(sf:noassert);
else
a:=IsomorphismFpGroup(sf:noassert);
fi;
ad:=List(GeneratorsOfGroup(Range(a)),i->PreImagesRepresentative(a,i));
lad:=Length(ad);

Expand Down Expand Up @@ -865,3 +869,6 @@ InstallOtherMethod( IsomorphismFpGroupBySubnormalSeries, "for groups", true,
function( G, series )
return IsomorphismFpGroupBySubnormalSeries( G, series, "F" );
end);

InstallOtherMethod(IsomorphismFpGroupForRewriting,"generic fallback",true,
[IsGroup],0,IsomorphismFpGroup);
96 changes: 51 additions & 45 deletions lib/gpprmsya.gi
Original file line number Diff line number Diff line change
Expand Up @@ -349,51 +349,57 @@ local F, # free group
return hom;
end);

# alternative, which has nicer (but more) generators
#function ( G )
#local F, # free group
# gens, #generators of F
# imgs,
# hom, # bijection
# mov,deg,
# relators,
# i, k; # loop variables
#
# mov:=MovedPoints(G);
# deg:=Length(mov);
#
# # create the finitely presented group with <G>.degree-1 generators
# F := FreeGroup( deg-2, Concatenation("A_",String(deg),".") );
# gens:=GeneratorsOfGroup(F);
#
# # add the relations according to the presentation by Carmichael
# # (see Coxeter/Moser)
# relators := [];
# for i in [1..deg-2] do
# Add( relators, gens[i]^3 );
# od;
# for i in [1..deg-3] do
# for k in [i+1..deg-2] do
# Add( relators, (gens[i] * gens[k])^2 );
# od;
# od;
#
# F:=F/relators;
#
# SetSize(F,Size(G));
# UseIsomorphismRelation( G, F );
#
# # compute the bijection
# imgs:=[];
# for i in [1..deg-2] do
# Add(imgs,(mov[1],mov[i+1],mov[deg]));
# od;
#
# # return the isomorphism to the finitely presented group
# hom:= GroupHomomorphismByImagesNC(G,F,imgs,GeneratorsOfGroup(F));
# SetIsBijective( hom, true );
# return hom;
#end);
# Presentation that gives nicer rewriting (from Derek Holt)
# A_n = < x_1, ..., x_{n-2} | x_1^3, x_i^2 (i > 1),
# (x_i x_{i+1})^3 (1 <= i <= n-3)
# (x_i x_j)^2 (1 <= i, i+1 < j, j <= n-2) >.
InstallMethod(IsomorphismFpGroupForRewriting,"alternating",
[IsNaturalAlternatingGroup],0,
function ( G )
local F, # free group
gens, #generators of F
imgs,
hom, # bijection
mov,deg,
relators,
i, j; # loop variables

mov:=MovedPoints(G);
deg:=Length(mov);

# create the finitely presented group with <G>.degree-1 generators
F := FreeGroup( deg-2, Concatenation("A_",String(deg),".") );
gens:=GeneratorsOfGroup(F);

relators := [];
Add(relators,gens[1]^3);
for i in [2..deg-2] do
Add(relators,gens[i]^2);
od;
for i in [1..deg-3] do
Add(relators,(gens[i]*gens[i+1])^3);
for j in [i+2..deg-2] do
Add(relators,(gens[i]*gens[j])^2);
od;
od;

F:=F/relators;

SetSize(F,Size(G));
UseIsomorphismRelation( G, F );

# compute the bijection
imgs:=[];
Add(imgs,(mov[1],mov[2],mov[3]));
for i in [3..deg-1] do
Add(imgs,(mov[1],mov[2])(mov[i],mov[i+1]));
od;

# return the isomorphism to the finitely presented group
hom:= GroupHomomorphismByImages(G,F,imgs,GeneratorsOfGroup(F));
SetIsBijective( hom, true );
return hom;
end);

################################################
# h has socle A_n^{l1}, acting on l1-tuples of l2-sets
Expand Down
28 changes: 28 additions & 0 deletions lib/grp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4390,6 +4390,34 @@ DeclareOperation(

DeclareGlobalFunction( "IsomorphismFpGroupByPcgs" );

#############################################################################
##
#A IsomorphismFpGroupForRewriting( <G> )
##
## <#GAPDoc Label="IsomorphismFpGroupForRewriting">
## <ManSection>
## <Attr Name="IsomorphismFpGroupForRewriting" Arg='G'/>
##
## <Description>
## returns an isomorphism from the given finite group <A>G</A> to a finitely
## presented group isomorphic to <A>G</A>. If possible, generators are
## chosen to lead to a monoid presentation that leads to a short
## set of confluent rewriting rules.
## <Example><![CDATA[
## gap> g := AlternatingGroup(5);;
## gap> iso := IsomorphismFpGroupForRewriting( g );
## [ (1,2,3), (1,2)(3,4), (1,2)(4,5) ] -> [ A_5.1, A_5.2, A_5.3 ]
## gap> fp := Image( iso );;
## gap> RelatorsOfFpGroup( fp );
## [ A_5.1^3, A_5.2^2, A_5.3^2, (A_5.1*A_5.2)^3, (A_5.1*A_5.3)^2,
## (A_5.2*A_5.3)^3 ]
## ]]></Example>
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "IsomorphismFpGroupForRewriting", IsGroup );


#############################################################################
##
Expand Down
6 changes: 3 additions & 3 deletions lib/twocohom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ end );
BindGlobal("ConfluentMonoidPresentationForGroup",function(G)
local iso,fp,n,dec,homs,mos,rulz,i,j,ffp,imo,m,k,gens,fm,mgens,rules,
loff,off,monreps,left,right,fmgens,r,diff,monreal,nums,reduce,hom;
iso:=IsomorphismFpGroupByChiefSeries(G);
iso:=IsomorphismFpGroupByChiefSeries(G:rewrite);
fp:=Range(iso);
gens:=GeneratorsOfGroup(fp);
n:=Length(gens);
Expand Down Expand Up @@ -796,7 +796,7 @@ local iso,fp,n,dec,homs,mos,rulz,i,j,ffp,imo,m,k,gens,fm,mgens,rules,
else Add(l,-2*i);fi;
od;
return ElementOfFpMonoid(FamilyObj(One(m)),
AssocWordByLetterRep(One(fm),l));
AssocWordByLetterRep(FamilyObj(One(fm)),l));
end,
function(w)
local g,i,x;
Expand All @@ -810,7 +810,7 @@ local iso,fp,n,dec,homs,mos,rulz,i,j,ffp,imo,m,k,gens,fm,mgens,rules,
else Add(g,x); fi;
od;
return ElementOfFpGroup(FamilyObj(One(fp)),
AssocWordByLetterRep(One(FreeGroupOfFpGroup(fp)),g));
AssocWordByLetterRep(FamilyObj(One(FreeGroupOfFpGroup(fp))),g));
end);

hom!.type:=1;
Expand Down

0 comments on commit 256316b

Please sign in to comment.