Skip to content

Commit

Permalink
FIX: Fp homomorphism test if given on permuted standard generators
Browse files Browse the repository at this point in the history
This fixes gap-system#3100.
  • Loading branch information
hulpke committed Dec 11, 2018
1 parent 52d7cb8 commit b255dc2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ghomfp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ local s,sg,o,gi;
o:=One(Range(hom));
# take the images corresponding to the free gens in case of reordering or
# duplicates
gi:=MappingGeneratorsImages(hom)[2]{hom!.genpositions};
gi:=MappingGeneratorsImages(hom)[2]{ListPerm(PermList(hom!.genpositions)^-1,
Length(hom!.genpositions))};
return ForAll(RelatorsOfFpGroup(s),i->MappedWord(i,sg,gi)=o);
end);

Expand All @@ -85,7 +86,8 @@ local s, bas, sg, o, gi, l, p, rel, start, i;
o:=One(Range(hom));
# take the images corresponding to the free gens in case of reordering or
# duplicates
gi:=MappingGeneratorsImages(hom)[2]{hom!.genpositions};
gi:=MappingGeneratorsImages(hom)[2]{ListPerm(PermList(hom!.genpositions)^-1,
Length(hom!.genpositions))};
for rel in RelatorsOfFpGroup(s) do
l:=LetterRepAssocWord(rel);
for start in bas do
Expand Down
15 changes: 15 additions & 0 deletions tst/testbugfix/2018-12-11-fphomgenmix.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# test for fpgroup homs on mixed generators (fixing #3100)
gap> f := FreeGroup(18);;
gap> q := f / [ f.1*f.3*f.7, f.2*f.6*f.8, f.4*f.18*f.14, f.5*f.13*f.9, f.10*f.12*f.16,
> f.11*f.15*f.17, f.1*f.6, f.2*f.7, f.3*f.18, f.4*f.13, f.5*f.8, f.9*f.12, f.10*f.15, f.11*f.16,
> f.14*f.17 ];;
gap> src := [ q.3^-1*q.2^-1, q.2, q.3, q.4, q.5, q.2*q.3, q.7, q.8, q.9, q.10, q.11, q.12, q.13,
> q.14, q.15, q.16, q.17, q.18 ];;
gap> dst := [ q.16, q.10, q.12, q.13, q.14, q.11, q.15, q.17, q.18, q.1, q.2, q.3, q.4, q.5, q.6,
> q.7, q.8, q.9 ];;
gap> hom := GroupHomomorphismByImages(q,q,src,dst);;
gap> inv := GroupHomomorphismByImages(q,q,dst,src);;
gap> IsMapping(hom);
true
gap> IsMapping(inv);
true

0 comments on commit b255dc2

Please sign in to comment.