# 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;P
[x, z, y]
[y, x, z]


But now

sage: P*P


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(x)


results in

TypeError: 'Permutations_set_with_category.element_class' object is not callable

edit retag close merge delete

Sort by » oldest newest most voted sage: P = SymmetricGroup(var('x,y,z')); P
Symmetric group of order 3! as a permutation group


The elements are displayed in cycle notation, evaluation is allowed and there is a group structure:

sage: P
(x,y,z)
sage: P(x)
y
sage: P.tuple()
(y, z, x)
sage: P
(y,z)
sage: P*P
(x,z)


Note that the product is opposite from the more usual one (here P*P is P after P).

more

1

Thank you! Somehow I was stuck in my thought that SymmetricGroup would allow only integers.