FUNCTION: IsPerm - test whether the argument is a permutation
 
CALLING SEQUENCE:
-   IsPerm(expr)
-   TYP[IsPerm](expr)
-  
   
PARAMETERS:
- expr =  any expression
 
 
SYNOPSIS:
-  The IsPerm function tests whether expr is a  permutation. A  permutation
  of the symmetric  group S(n) is  a  list of n distinct 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).
 
 
-  Whenever there  is  a  conflict  between  the  function  name IsPerm and
  another  name  used in the same session, use the long form TYP['IsPerm'].
 
 
EXAMPLES:
> with(TYP):
> IsPerm([3,1]);
 
                                    false
 
> IsPerm([3,2,1]);
 
                                     true
 
> IsPerm([2,1,4,3], 'vexillary');
 
                                    false
 
SEE ALSO: Permutation