Skip to content

Commit 5b88db1

Browse files
authored
Improve conjugation test (#6267)
1 parent c9b62f3 commit 5b88db1

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

lib/grp.gi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2955,6 +2955,11 @@ end);
29552955

29562956
InstallMethod(IsConjugate,"subgroups",IsFamFamFam,[IsGroup, IsGroup,IsGroup],
29572957
function(g,x,y)
2958+
# conjugate subgroups must have the same order
2959+
if HasSize(x) and HasSize(y) and Size(x) <> Size(y) then
2960+
return false;
2961+
fi;
2962+
29582963
# shortcut for normal subgroups
29592964
if (HasIsNormalInParent(x) and IsNormalInParent(x)
29602965
and CanComputeIsSubset(Parent(x),g) and IsSubset(Parent(x),g))

lib/oprtperm.gi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,16 @@ InstallOtherMethod( RepresentativeActionOp, "permgrp",true, [ IsPermGroup,
13741374
# action on permgroups, use backtrack
13751375
elif act = OnPoints and IsPermGroup( d ) and IsPermGroup( e ) then
13761376

1377+
# conjugate subgroups must have the same order
1378+
if HasSize(d) and HasSize(e) and Size(d) <> Size(e) then
1379+
return fail;
1380+
fi;
1381+
1382+
# conjugate subgroups must be both abelian or both non-abelian
1383+
if HasIsAbelian(d) and HasIsAbelian(e) and IsAbelian(d) <> IsAbelian(e) then
1384+
return fail;
1385+
fi;
1386+
13771387
if Size(G)<10^5 or NrMovedPoints(G)<500
13781388
# cyclic is handled special by backtrack
13791389
or IsCyclic(d) or IsCyclic(e) or

tst/testinstall/ConjNatSym.tst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ true
55
gap> IsConjugate( SymmetricGroup(5), Group((1,2)), Group((3,4,5)));
66
false
77

8+
# Subgroups with different known orders in a non-natural symmetric group
9+
# (exercises the RepresentativeActionOp shortcut, not the natural sym method)
10+
gap> G:= SymmetricGroup( 1000 );;
11+
gap> H:= Subgroup( G, [ G.1 ] );; Size( H );
12+
1000
13+
gap> K:= Subgroup( G, [ G.2 ] );; Size( K );
14+
2
15+
gap> G:= Group( GeneratorsOfGroup( G ) );;
16+
gap> IsConjugate( G, H, K );
17+
false
18+
819
# This runs into the TryNextMethod case
920
gap> IsConjugate( SymmetricGroup(200),SymmetricGroup(200), AlternatingGroup(200));
1021
false

0 commit comments

Comments
 (0)