diff --git a/lib/grpcompl.gi b/lib/grpcompl.gi index d5bbface82..bba9f2afdd 100644 --- a/lib/grpcompl.gi +++ b/lib/grpcompl.gi @@ -99,9 +99,8 @@ local G,N,K,s, h, q, fpi, factorpres, com, comgens, cen, ocrels, fpcgs, ncom, Length(MappingGeneratorsImages(fpi)[2])," generators"); factorpres:=[FreeGeneratorsOfFpGroup(Range(fpi)), RelatorsOfFpGroup(Range(fpi)), - List(MappingGeneratorsImages(fpi)[2], + List(GeneratorsOfGroup(Range(fpi)), i->PreImagesRepresentative(fpi,i))]; - Assert(1,ForAll(factorpres[3],i->Image(h,PreImagesRepresentative(h,i))=i)); # initialize com:=[G]; diff --git a/lib/grppcfp.gi b/lib/grppcfp.gi index 1dc3ef8498..b71abcfbb0 100644 --- a/lib/grppcfp.gi +++ b/lib/grppcfp.gi @@ -878,6 +878,9 @@ local g, sq, hom; g:=arg[1]; sq:=CallFuncList(SQ,arg); hom:=GroupHomomorphismByImages(g,sq.image,GeneratorsOfGroup(g),sq.imgs); + if HasSize(g) and Size(g)=Size(sq.image) then + SetIsInjective(hom,true); + fi; return hom; end); diff --git a/tst/testbugfix/2019-04-09-Lattice.tst b/tst/testbugfix/2019-04-09-Lattice.tst index 13537a39da..77d8b6c664 100644 --- a/tst/testbugfix/2019-04-09-Lattice.tst +++ b/tst/testbugfix/2019-04-09-Lattice.tst @@ -1,3 +1,10 @@ # see https://github.com/gap-system/gap/pull/3397 +# and https://github.com/gap-system/gap/issues/3496 gap> l:=AllSmallGroups(960,IsSolvableGroup,false);;g:=l[5];; +gap> nat:=NaturalHomomorphismByNormalSubgroup(g,RadicalGroup(g));; +gap> fpi:=IsomorphismFpGroup(Group(GeneratorsOfGroup(Range(nat))));; +gap> fpi:=GroupHomomorphismByImages(Range(nat),Range(fpi), +> GeneratorsOfGroup(Range(nat)),List(GeneratorsOfGroup(Range(nat)), +> x->ImagesRepresentative(fpi,x)));; +gap> SetIsomorphismFpGroup(ImagesSource(nat),fpi);; gap> StructureDescription(g);;t:=TableOfMarks(g);;