Note: SageMath's Group.character_table() method is built as a wrapper for GAP's CharacterTable() function.
Let $G = \text{Sym}_4$. I would like to be able to extract the character of $G$ indexed by a given partition, say $\lambda = (3,1)$.
I have looked for this online and it seems like this is possible to do in GAP. However, I am struggling to translate GAP commands to SageMath commands in a way that works.
Minimal working example:
sage: G = SymmetricGroup(4)
sage: G.character_table()
[ 1 -1 1 1 -1]
[ 3 -1 -1 0 1]
[ 2 0 2 -1 0]
[ 3 1 -1 0 -1]
[ 1 1 1 1 1]
sage: lam = Partition([3,1])
I want to find a few lines of code that take G and lam and output the character char such that
sage: type(char)
<class 'sage.groups.class_function.ClassFunction_gap'>
sage: char.values()
(3 1 -1 0 -1)
or something similar.
Here it is, just one line:
Indeed:
Alternatively one could implement the Murnaghan–Nakayama rule.