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

isPerm -- whether a list is a permutation in 1-line notation

Synopsis

Description

Given a list of length $n$, checks if the entries of the permutation are the integers from 1 to $n$.

i1 : w = {5,3,4,6,1,2}

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

o1 : List
i2 : isPerm w

o2 = true
i3 : v = {4,3,2}

o3 = {4, 3, 2}

o3 : List
i4 : isPerm v

o4 = false

Ways to use isPerm :

For the programmer

The object isPerm is a method function.