Conjugacy Classes

Recall that the conjugate of an element $g$ of a group $G$ by $x$ is calculated by \[ ^g x = xgx^{-1} \] And the cojugacy class of $g$, denoted $^G x$, is the set of all conjugates of $g$ in $G$. We implement a function in SageMath to calculate these classes as follows.

We also define some other functions that do similar things, such as calculate all of the cojugacy classes of a group, as well a function that calculates all of the conjugacy classes of a group, and keeps track of which elements generate that conjugacy class.

Example

With these tools in hand, we now go through an example of using the above functions.