Macaulay2 » Documentation
Packages » MatrixSchubert :: composePerms
next | previous | forward | backward | up | index | toc

composePerms -- computes the composition of two permutations

Synopsis

Description

Computes the composition of two permutations, $u$ and $v$, as $u*v$. Note that the permutations must be written as a list in 1-line notation and must both be permutations of (the same) $n$ letters.

i1 : u = {2,3,4,1}

o1 = {2, 3, 4, 1}

o1 : List
i2 : v = {4,3,2,1}

o2 = {4, 3, 2, 1}

o2 : List
i3 : composePerms(u,v)

o3 = {1, 4, 3, 2}

o3 : List
i4 : u = {1,2,3,4,5}

o4 = {1, 2, 3, 4, 5}

o4 : List
i5 : v = {3,5,2,1,4}

o5 = {3, 5, 2, 1, 4}

o5 : List
i6 : composePerms(u,v)

o6 = {3, 5, 2, 1, 4}

o6 : List
i7 : u = {3,5,2,1,4}

o7 = {3, 5, 2, 1, 4}

o7 : List
i8 : v = {1,2,3,4,5}

o8 = {1, 2, 3, 4, 5}

o8 : List
i9 : composePerms(u,v)

o9 = {3, 5, 2, 1, 4}

o9 : List

Ways to use composePerms:

For the programmer

The object composePerms is a method function.