# Conjugacy classes of groups¶

This module implements a wrapper of GAP’s ConjugacyClass function.

There are two main classes, ConjugacyClass and ConjugacyClassGAP. All generic methods should go into ConjugacyClass, whereas ConjugacyClassGAP should only contain wrappers for GAP functions. ConjugacyClass contains some fallback methods in case some group cannot be defined as a GAP object.

Todo

• Implement a non-naive fallback method for computing all the elements of the conjugacy class when the group is not defined in GAP, as the one in Butler’s paper.
• Define a sage method for gap matrices so that groups of matrices can use the quicker GAP algorithm rather than the naive one.

EXAMPLES:

Conjugacy classes for groups of permutations:

sage: G = SymmetricGroup(4)
sage: g = G((1,2,3,4))
sage: G.conjugacy_class(g)
Conjugacy class of (1,2,3,4) in Symmetric group of order 4! as a permutation group


Conjugacy classes for groups of matrices:

sage: F = GF(5)
sage: gens = [matrix(F,2,[1,2, -1, 1]), matrix(F,2, [1,1, 0,1])]
sage: H = MatrixGroup(gens)
sage: h = H(matrix(F,2,[1,2, -1, 1]))
sage: H.conjugacy_class(h)
Conjugacy class of [1 2]
[4 1] in Matrix group over Finite Field of size 5 with 2 generators (
[1 2]  [1 1]
[4 1], [0 1]
)


TESTS:

sage: G = SymmetricGroup(3)
sage: g = G((1,2,3))
sage: C = ConjugacyClass(G,g)
sage: TestSuite(C).run()

class sage.groups.conjugacy_classes.ConjugacyClass(group, element)

Generic conjugacy classes for elements in a group.

This is the default fall-back implementation to be used whenever GAP cannot handle the group.

EXAMPLES:

sage: G = SymmetricGroup(4)
sage: g = G((1,2,3,4))
sage: ConjugacyClass(G,g)
Conjugacy class of (1,2,3,4) in Symmetric group of order 4! as a
permutation group

is_rational()

Checks if self is rational (closed for powers).

EXAMPLES:

sage: G = SymmetricGroup(4)
sage: g = G((1,2,3,4))
sage: c = ConjugacyClass(G,g)
sage: c.is_rational()
False

is_real()

Checks if self is real (closed for inverses).

EXAMPLES:

sage: G = SymmetricGroup(4)
sage: g = G((1,2,3,4))
sage: c = ConjugacyClass(G,g)
sage: c.is_real()
True

list()

Return a list with all the elements of self.

EXAMPLES:

Groups of permutations:

sage: G = SymmetricGroup(3)
sage: g = G((1,2,3))
sage: c = ConjugacyClass(G,g)
sage: L = c.list()
sage: Set(L) == Set([G((1,3,2)), G((1,2,3))])
True

representative()

Return a representative of self.

EXAMPLES:

sage: G = SymmetricGroup(3)
sage: g = G((1,2,3))
sage: C = ConjugacyClass(G,g)
sage: C.representative()
(1,2,3)

set()

Naive algorithm to give a set with all the elements of the conjugacy class.

Todo

Implement a non-naive algorithm, cf. for instance G. Butler: “An Inductive Schema for Computing Conjugacy Classes in Permutation Groups”, Math. of Comp. Vol. 62, No. 205 (1994)

EXAMPLES:

Groups of permutations:

sage: G = SymmetricGroup(3)
sage: g = G((1,2))
sage: C = ConjugacyClass(G,g)
sage: S = [(2,3), (1,2), (1,3)]
sage: C.set() == Set(G(x) for x in S)
True


Groups of matrices over finite fields:

sage: F = GF(5)
sage: gens = [matrix(F,2,[1,2, -1, 1]), matrix(F,2, [1,1, 0,1])]
sage: H = MatrixGroup(gens)
sage: h = H(matrix(F,2,[1,2, -1, 1]))
sage: C = ConjugacyClass(H,h)
sage: S = [[[3, 2], [2, 4]], [[0, 1], [2, 2]], [[3, 4], [1, 4]],\
[[0, 3], [4, 2]], [[1, 2], [4, 1]], [[2, 1], [2, 0]],\
[[4, 1], [4, 3]], [[4, 4], [1, 3]], [[2, 4], [3, 0]],\
[[1, 4], [2, 1]], [[3, 3], [3, 4]], [[2, 3], [4, 0]],\
[[0, 2], [1, 2]], [[1, 3], [1, 1]], [[4, 3], [3, 3]],\
[[4, 2], [2, 3]], [[0, 4], [3, 2]], [[1, 1], [3, 1]],\
[[2, 2], [1, 0]], [[3, 1], [4, 4]]]
sage: C.set() == Set(H(x) for x in S)
True

class sage.groups.conjugacy_classes.ConjugacyClassGAP(group, element)

Class for a conjugacy class for groups defined over GAP. Intended for wrapping GAP methods on conjugacy classes.

INPUT:

• group – the group in which the conjugacy class is taken
• element – the element generating the conjugacy class

EXAMPLES:

sage: G = SymmetricGroup(4)
sage: g = G((1,2,3,4))
sage: ConjugacyClassGAP(G,g)
Conjugacy class of (1,2,3,4) in Symmetric group of order 4! as a
permutation group

set()

Return a Sage Set with all the elements of the conjugacy class.

By default attempts to use GAP construction of the conjugacy class. If GAP method is not implemented for the given group, and the group is finite, falls back to a naive algorithm.

Warning

The naive algorithm can be really slow and memory intensive.

EXAMPLES:

Groups of permutations:

sage: G = SymmetricGroup(4)
sage: g = G((1,2,3,4))
sage: C = ConjugacyClassGAP(G,g)
sage: S = [(1,3,2,4), (1,4,3,2), (1,3,4,2), (1,2,3,4), (1,4,2,3), (1,2,4,3)]
sage: C.set() == Set(G(x) for x in S)
True


#### Previous topic

Elements of a semimonomial transformation group.