Ask Your Question

Determining if two subgroups of a symmetric group are conjugate

asked 2018-11-21 04:08:01 +0200

cjohnson gravatar image

If I have two particular subgroups of a symmetric group, is there any built-in way in Sage to determine if the groups are conjugate to one another? I tried creating a ConjugacyClass for each and then comparing them, but this gives an error:

S = SymmetricGroup(3)
gen1 = Permutation('(1,2,3)')
gen2 = Permutation('(1,3,2)')
gen3 = Permutation('(1,2)')
gen4 = Permutation('(1,3)')
G1 = PermutationGroup([gen1, gen3])
G2 = PermutationGroup([gen2, gen4])
ConjugacyClass(S, G1) == ConjugacyClass(S, G2)

When executing the very last line I get the error

TypeError: For implementing multiplication, provide the method '_mul_' for (1,2) resp. Permutation Group with generators [(1,2), (1,2,3)]
edit retag flag offensive close merge delete


What version of Sage? What operating system? How was Sage installed?

slelievre gravatar imageslelievre ( 2018-11-21 09:05:15 +0200 )edit

I was using an older version of Sage (7.1, I think?) on macOS High Sierra, installed using the binaries on I've updated my version of Sage and no longer have the TypeError from before, but am not getting the result I'd expect, as elaborated on in the comment below your answer.

cjohnson gravatar imagecjohnson ( 2018-11-21 15:47:29 +0200 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2019-09-20 06:46:13 +0200

Gordon gravatar image

updated 2019-09-20 08:40:22 +0200

nbruin gravatar image

This is quite old, but since it is not answered:

One way to do this is do use the (built-in) version of GAP to test the conjugacy.

This has the function RepresentativeAction(g,g1,g2) which takes three arguments, g, g1, g2 and either returns fail if g1 and g2 are not conjugate in g, or returns a conjugating element if they are.

You need to turn everything into a GAP-object in order to do this.

 gap.RepresentativeAction(gap("SymmetricGroup(3)"), gap(G1), gap(G2))

This returns () which is the identity, indicating that the groups are not only conjugate, but identical.

EDIT: if you define

S = SymmetricGroup(3)
gen1 = Permutation('(1,2)(3)')
gen2 = Permutation('(1,3)(2)')

You'll see that you get

sage: gap.RepresentativeAction(gap(S),gap(H1),gap(H2))

so the subgroups are conjugate, but not identical. Useful to know how to get this info, though!

edit flag offensive delete link more

answered 2018-11-21 09:04:12 +0200

slelievre gravatar image

This seems to work fine in Sage 8.4, for instance as tried on SageMathCell at

Here is how to check the version of Sage (a good thing to include when reporting errors).

sage: print(version())
SageMath version 8.4, Release Date: 2018-10-17

Testing if two conjugacy classes are equal works:

sage: S = SymmetricGroup(3)
sage: a = Permutation('(1, 2, 3)')
sage: b = Permutation('(1, 3, 2)')
sage: c = Permutation('(1, 2)')
sage: d = Permutation('(1, 3)')
sage: G = PermutationGroup([a, c])
sage: H = PermutationGroup([b, d])
sage: GG = ConjugacyClass(S, G)
sage: HH = ConjugacyClass(S, H)
sage: GG == HH

I changed the notation from that in the question, but copy-pasting the exact code from the question works equally well (try it in SageMathCell).

edit flag offensive delete link more



I've updated to 8.4 and no longer have this error, but am not getting the expected result:

S = SymmetricGroup(3)
gen1 = Permutation('(1,2)(3)')
gen2 = Permutation('(1,3)(2)')
G = PermutationGroup([gen1])
H = PermutationGroup([gen2])
CCG = ConjugacyClass(S, G)
CCH = ConjugacyClass(S, H)
print CCG == CCH

This prints False, though these groups are conjugate.

cjohnson gravatar imagecjohnson ( 2018-11-21 15:45:51 +0200 )edit

The problem is that ConjugacyClass looks like it determines the conjugacy class of elements, not of subgroups.

nbruin gravatar imagenbruin ( 2019-09-20 08:42:55 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-11-20 20:06:56 +0200

Seen: 1,251 times

Last updated: Sep 20 '19