# 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

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[2]
(x,y,z)
sage: P[2](x)
y
sage: P[2].tuple()
(y, z, x)
sage: P[3]
(y,z)
sage: P[2]*P[3]
(x,z)


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

more

1

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

( 2022-04-12 15:50:40 +0200 )edit

## Stats

Seen: 115 times

Last updated: Apr 12 '22