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

isOdd -- whether a permutation is odd

Description

A permutation $p$ is odd if it can be written as a product of an odd number of transpositions. Equivalently, a permutation is odd if its sign is $-1$.

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

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

o1 : Permutation
i2 : isOdd p

o2 = true

See also

Ways to use isOdd:

  • isOdd(Permutation)

For the programmer

The object isOdd is a method function.


The source of this document is in Permutations/Documentation/mainDocs.m2:446:0.