Function: permtonum
Section: conversions
C-Name: permtonum
Prototype: G
Help: permtonum(x): ordinal (between 1 and n!) of permutation x.
Doc: given a permutation $x$ on $n$ elements, gives the number $k$ such that
 $x=\kbd{numtoperm(n,k)}$, i.e.~inverse function of \tet{numtoperm}.
 The numbering used is the standard lexicographic ordering, starting at $0$.
