| 1 | initial version |
This seems to work fine in Sage 8.4, for instance as tried on SageMathCell at https://sagecell.sagemath.org/.
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
False
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).
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.