Let S= {"A","B","C","D"} and S4= SymmetricGroup(4). I want to create a table of the action S4 x S -> S which standardly permutes the letters in the set. The table should look like:
Permutation. A. B. C. D
() A. B. C. D
(1 2 ) B. A. C. D.
etc.
How can this be done with Sage? ( The Set and Group in the question are just examples, I want to be able to create a table for any action.
Best Answer
Given a group $G$, an ordered set $X$ and an action $\varphi: G \times X \to X$, based on your example you want a table with rows $g, \operatorname{im} \varphi(g, \cdot)$, where the images of the elements of $X$ are computed in the given order.
We can arrange this in SAGE as follows (using your example):
Output:
The row with the identity element conveniently serves as a heading.
Clearly hardest part of this is to define the action.