Macaulay2 » Documentation
Packages » Permutations :: Permutation == Permutation
next | previous | forward | backward | up | index | toc

Permutation == Permutation -- whether two permutations are the same

Description

Two permutations $p$ and $q$ are equal if $p(i) = q(i)$ for all $i$.

i1 : p = permutation {3,1,2,5,4}

o1 = Permutation{3, 1, 2, 5, 4}

o1 : Permutation
i2 : q = permutation {3,1,2,5,4,6,7}

o2 = Permutation{3, 1, 2, 5, 4, 6, 7}

o2 : Permutation
i3 : p == q

o3 = true

The permutations do not need to be the same length.

i4 : p = permutation {3,1,2,4}

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

o4 : Permutation
i5 : q = permutation {3,1,2,4,5,6}

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

o5 : Permutation
i6 : p == q

o6 = true

Ways to use this method:


The source of this document is in /build/reproducible-path/macaulay2-1.25.06+ds/M2/Macaulay2/packages/Permutations/Documentation/operationsDocs.m2:108:0.