Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Multiply Arbitrary Permutations

Is there a way to multiply arbitrary permutations?

sage: P=Permutations(var('x y z'));P
Permutations of the set [x, y, z]
sage: P[1];P[2]
[x, z, y]
[y, x, z]

But now

sage: P[1]*P[2]

gives an error:

TypeError: unsupported operand parent(s) for *: 'Permutations of the set [x, y, z]' and 'Permutations of the set [x, y, z]'

I can't even evaluate such a permutation at an element.

sage: P[1](x)

results in

TypeError: 'Permutations_set_with_category.element_class' object is not callable