% $Date: 2003/09/15 16:37:45 $ $Author: nthiery $ $Revision: 1.1.1.1 $

\begin{Mhelppage}{Perm2Interval}
  {V. Prosper}%
  \begin{MInfo}
    \eng{computes all codes of permutations below a given one}
  \end{MInfo}
  
\begin{MCalls}
  \Mcall{perm}
\end{MCalls}

\begin{MParameters}
  \param{perm}
  \eng{any list denoting a permutation} 
\end{MParameters}

\begin{MIntro}
  \eng{
The {\Mthis} function computes the list of the Lehmer  codes of all
permutations that are smaller than \Mex{perm}, according to the  Bruhat  order.
}
\end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
muEC::SG::Perm2Interval( [3,1,2] );
\end{Mexin}
\begin{Mexout}
         [[2, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 0]]
\end{Mexout}
\begin{Mexin}
map( muEC::SG::Perm2Interval([3,2,1]), muEC::SG::Code2Perm );
\end{Mexin}
\begin{Mexout}
[[3, 2, 1], [3, 1, 2], [2, 3, 1], [2, 1, 3], [1, 3, 2], 

   [1, 2, 3]]
\end{Mexout}
\end{MExample}

\MRelatedFunctions{CompPerm,Perm2Betti,Perm2Demazure}
                                %\Mup[IDCA,Perm2Demazure]{Perm2Demazure}
\end{Mhelppage}
