Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to work with the action of the symmetric group in Sage?

I wonder if there is a more natural or intuitive way to think about the action of an element of the symmetric group on the set it permutes. I will illustrate my concern with a simple example:

in: S=SymmetricGroup(3)
in: a=S((1,2))
in: b=S((2,3))
in: a*b
out: (1,3,2)
in: [a(b(i)) for i in range(1,4)]
out: [2, 3, 1]
in: [b(a(i)) for i in range(1,4)]
out: [3, 1, 2]
in: [(a*b)(i) for i in range(1,4)]
out: [3, 1, 2]

I understand that Sage is internally consistent here; my confusion is about how to reconcile this behavior with the usual mathematical notation for the permutation action.

What I have in mind intuitively is the following hypothetical:

in: [(i)(a*b) for i in range(1,4)] == [((i)a)b for i in range(1,4)] 
out: True

where I would denote the right action of an element w on the index i by (i)w.

Maybe I am missing a standard or recommended approach in Sage for thinking about permutation actions in this situation, and I would appreciate any clarification.

A potentially related question.