diff --git a/lib/ghomperm.gi b/lib/ghomperm.gi index 8704e466f4..d8d72c9075 100644 --- a/lib/ghomperm.gi +++ b/lib/ghomperm.gi @@ -1964,6 +1964,13 @@ function( hom ) if IsEndoGeneralMapping( hom ) then + # cheap test for cycle structures + if Length(Set(List(MappingGeneratorsImages(hom), + x->List(x,CycleStructurePerm))))>1 + then + return false; + fi; + # test in transitive case whether we can realize in S_n # we do not yet compute the permutation here because we will still have to # test first whether it is in fact an inner automorphism: @@ -2106,9 +2113,11 @@ function( hom ) if rep<>fail then pi:=List([1..Length(orb)],x->MappingPermListList(Permuted(orb[x],rep[x]),orb[x])); rep:=Product(pi); - Assert(1,ForAll(genss,i->ImagesRepresentative(hom,i)=i^rep)); - SetConjugatorOfConjugatorIsomorphism( hom, rep ); - return true; + # must do final test, in case element maps to restricted perm + if ForAll(genss,i->ImagesRepresentative(hom,i)=i^rep) then + SetConjugatorOfConjugatorIsomorphism( hom, rep ); + return true; + fi; fi; if ValueOption("cheap")=true then diff --git a/tst/testbugfix/2018-08-22-IsConjugatorAutomorphism.tst b/tst/testbugfix/2018-08-22-IsConjugatorAutomorphism.tst new file mode 100644 index 0000000000..a71bd9dabd --- /dev/null +++ b/tst/testbugfix/2018-08-22-IsConjugatorAutomorphism.tst @@ -0,0 +1,4 @@ +gap> a:=Group((9,11)(10,12)(13,15)(14,16), (1,5,3,7)(2,6,4,8));; +gap> hom:=GroupHomomorphismByImages(a,a,[a.1,a.2*a.1],[a.1,a.2]);; +gap> IsConjugatorAutomorphism(hom); +false