TYP::IsPerm
--
tests whether the argument is a permutation
TYP::IsPerm(expr <,dominant,grassmannian,vexillary>)
expr | - | any expression |
The TYP::IsPerm
function tests whether expr
is a
permutation that is a list of n
disctinct positive
integers between 1 and n
.
One can test whether the permutation is either dominant,
grassmannian or vexillary by using the corresponding second
argument, dominant
, grassmannian
or
vexillary
.
A permutation is dominant, if and only if its code is a partition (i.e. weakly decreasing vector of non-negative integers).
A permutation is grassmannian, if and only if it has only one descent, or in other words, if there exists only one i with perm[i]>perm[i+1].
Let part(perm)
be the partition obtained by reordering the
components of its code. Then perm
is vexillary if and
only if part(Perm2Inv(perm))
is the conjugate of
part(perm)
.
>> muEC::TYP::IsPerm( [3,1] );
FALSE
>> muEC::TYP::IsPerm( [3,2,1] );
TRUE
>> muEC::TYP::IsPerm( [2,1,4,3], vexillary );
FALSE
MuPAD Combinat, an open source algebraic combinatorics package