diff --git a/lib/gpprmsya.gi b/lib/gpprmsya.gi index 59aa07f2ba..b241d0a51f 100644 --- a/lib/gpprmsya.gi +++ b/lib/gpprmsya.gi @@ -1552,6 +1552,20 @@ local og,oh,cb,cc,cac,perm1,perm2, fi; end); +InstallMethod( IsConjugate, "for natural symmetric group", + true, [ IsNaturalSymmetricGroup, IsGroup, IsGroup ], +function (s, g, h) + local res; + res := SubgpConjSymmgp(s, g, h); + if IsPerm(res) then + return true; + elif res = fail then + return false; + else + TryNextMethod(); + fi; +end); + ############################################################################# ## #M RepresentativeAction( , , , ) . . for symmetric groups diff --git a/lib/grp.gd b/lib/grp.gd index 94510ddb69..24ea0e114a 100644 --- a/lib/grp.gd +++ b/lib/grp.gd @@ -1273,7 +1273,7 @@ DeclareGlobalFunction("MaximalSolvableSubgroups"); ## is the smallest normal subgroup of G that has a solvable factor group. ## PerfectResiduum(Group((1,2,3,4,5),(1,2))); -## Group([ (1,3,2), (1,4,3), (3,5,4) ]) +## Group([ (1,3,2), (1,4,3), (2,5,4) ]) ## ]]> ## ## diff --git a/tst/testinstall/ConjNatSym.tst b/tst/testinstall/ConjNatSym.tst new file mode 100644 index 0000000000..3dd7b4e330 --- /dev/null +++ b/tst/testinstall/ConjNatSym.tst @@ -0,0 +1,14 @@ +# The following two test use the new version for natural symmetric group + +gap> IsConjugate( SymmetricGroup(5), Group((1,2)), Group((3,4))); +true +gap> IsConjugate( SymmetricGroup(5), Group((1,2)), Group((3,4,5))); +false + +# This runs into the TryNextMethod case +gap> IsConjugate( SymmetricGroup(200),PrimitiveGroup(200,4), PrimitiveGroup(200,3)); +false + +# Here, using SubgpConjSymmgp yields a significant speedup +gap> IsConjugate(SymmetricGroup(250),Group([ (1,5,9,7)(2,3)(4,8,6,10), (1,9)(5,7)(8,10), (1,9)(8,10) ]), Group([ (1,3)(2,8,10)(4,6)(5,11,7,9), (2,8)(9,11), (1,3)(4,6)(5,9,7,11)(8,10) ])); +false