Let $ G $ be a finite group of matrices. In particular suppose that $ G $ is a finite subgroup of $ SU_n $. What would be the best way to use GAP to figure out if the adjoint representation of $ G $ on $ \mathfrak{su}_n $ is irreducible?
One way to do this would be to use Schur's lemma. In other words, to show that $ G $ is Ad-irreducible it is enough to show that for $ Ad:G \to GL(\mathfrak{su}_n) $ the centralizer $ C_{GL(\mathfrak{su}_n)}(Ad(G)) $ is just multiplies of the identity.
Generically, the following should work to get your character formula evaluated (group is
G)For convenience, we define a small auxiliary function that evaluates, for a complex $t$, $|t|^4$. We use that
GaloisCyc(t,-1)is the complex conjugate:With this, we can now evaluate the trace sum over the conjugacy classes -- we sum over the conjugacy classes and weigh each term with the size of the class (you will still have to divide by the group order):