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

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

  \begin{MInfo}
    \eng{expresses any expression in the basis of monomials}
  \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 expresses any expression \Mex{expr} in the basis of
monomials.
\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]}, the second alphabet being the \Mex{y}i's),
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).

The call \Mex{{\Mthis}(expr, x)} does not affect the argument \Mex{expr}.

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{Tox(expr, b, Collect)}.
For instance, \Mex{{\Mthis}(expr, x, Collect)} may be used to collect the
argument expr.
}
\end{MIntro}
%
\begin{MExample}{ex1}
%
\begin{Mexin}
muEC::SP::Tox((1+q)^5*X[1,4,3,2], NoExpand);
\end{Mexin}
\begin{Mexout}
            5       2     2                           2
     (q + 1)  (x1 x2  + x1  x2 + x3 (x2 (x1 + x2) + x1 ))
\end{Mexout}
\begin{Mexin}
muEC::SP::Tox((1+q)^5*X[3,1,2]*Y[0,1,2], Collect);
\end{Mexin}
\begin{Mexout}
       5   2   3          5   2   2             5      4
(q + 1)  x2  x1  + (q + 1)  x2  x1  x3 + (q + 1)  x2 x1  +

             5       3             5      2   2
   (2 (q + 1) ) x2 x1  x3 + (q + 1)  x2 x1  x3  +

          5   4             5   3   2
   (q + 1)  x1  x3 + (q + 1)  x1  x3
\end{Mexout}
\end{MExample}
%
\MRelatedFunctions{ToX}
\end{Mhelppage}
