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

\begin{Mhelppage}{ToPe}{S. Veigneau}

  \begin{MInfo}
    \eng{converts any expression to the Pe-basis}
  \end{MInfo}
      
\begin{MCalls}
 \Mcall{expr}
\end{MCalls}
%
\begin{MParameters}
  \param{expr}
  \eng{any expression}
  \param{b}
  \eng{any name of a known basis} 
\end{MParameters}
%
\begin{MIntro}
  \eng{
The {\Mthis} function  converts  any  expression expr to the \Mex{Pe}-basis,
which is the dual basis of the basis of monomials less than the
``staircase'' monomial, i.e. the basis of products of elementary
symmetric functions on an alphabet flag.
For instance, \Mex{Pe[1, 2, 0, 1, 0]} stands for the product
\Mex{e1(x1,x2,x3,x4)*e2(x1,x2,x3)*e1(x1)}.

\Mex{expr} may involve some \Mex{x}i's, simple  Schubert  polynomials
(\Mex{X[perm]}, \Mex{Y[code]}), double Schubert polynomials
(\Mex{XX[perm]}, \Mex{YY[code]}), product of elementary functions
(\Mex{Pe[vect]}), other terms being considered as coefficients.

The expression \Mex{expr} is expanded and the result is not collected.

One  may  specify  by  a  second  argument, say  \Mpar{b}, that \Mex{expr} is
solely expressed in terms of the known basis \Mpar{b} (\Mex{x}, \Mex{X},
\Mex{Y}, \Mex{XX}, \Mex{YY}, \Mex{Pe} and even \Mex{y} that is seen as a basis
in the package).

One may add \Mex{NoExpand} just after the argument \Mex{expr} to choose not to
expand the expression expr before treating it.

One may collect the result by adding a third  argument: this is done by 
\Mex{ToPe(expr, b, Collect)}.
}
\end{MIntro}
%
\begin{MExample}{ex1}
%
\begin{Mexin}
muEC::SP::ToPe((1+q)^5*x3*x4, NoExpand);
\end{Mexin}
\begin{Mexout}
(Pe[1, 0, 0] - Pe[1, 0, 0, 0]) (Pe[1, 0, 0, 0] -

                             5
   Pe[1, 0, 0, 0, 0]) (q + 1)
\end{Mexout}
\begin{Mexin}
muEC::SP::ToPe(q^2*x3*XX[3,1,2]*Y[0,1], Collect);
\end{Mexin}
\begin{Mexout}
  2                             2
(q  y1 y2) Pe[2, 0, 0, 0] + (- q  y1 y2) Pe[2, 0, 0] +

       2       2                       2
   (- q  y1 - q  y2) Pe[2, 0, 1, 0] + q  Pe[3, 0, 1, 0] +

     2       2                    2
   (q  y1 + q  y2) Pe[2, 1, 0] + q  Pe[2, 1, 1, 0] +

       2                       2
   (- q ) Pe[3, 1, 0, 0] + (- q ) Pe[1, 2, 1, 0]
\end{Mexout}
\end{MExample}
%
\MRelatedFunctions{Tox,ToX,ToXX}
\end{Mhelppage}
