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

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

- Operator: ==
- Usage:
    `w == v`
- Inputs:
  - w, a permutation,
  - v, a permutation,
- Outputs:
  - a Boolean value,

## 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:

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

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