% $Date: 2004/10/04 17:25:12 $ $Author: nthiery $ $Revision: 1.1.1.2 $

\begin{Mhelppage}{Perm2Betti}{V. Prosper}%
  \begin{MInfo}
    \eng{computes the Betti polynomial}
  \end{MInfo}
  

\begin{MCalls}
  \Mcall{p,q}
\end{MCalls}

\begin{MParameters}
  \param{p}
  \eng{any list denoting a permutation} 
  \param{q}
  \eng{a formal variable} 
\end{MParameters}

\begin{MIntro}
  \eng{

The {\Mthis} function computes the generating function of  the  lengths  of
all permutations that are smaller than a given permutation \Mex{p},
according to Bruhat order.
}
\end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
muEC::SG::Perm2Betti( [3,4,1,2], q );
\end{Mexin}
\begin{Mexout}
                   4      3      2
                  q  + 4 q  + 5 q  + 3 q + 1
\end{Mexout}
% \begin{Mexout}[hide]
                % q*3 + q^2*5 + q^3*4 + q^4 + 1
% \end{Mexout}
\end{MExample}

\MRelatedFunctions{CompPerm,Perm2Interval}
\end{Mhelppage}
