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

\begin{Mhelppage}{Tom}%
  {V. Prosper}%
  \begin{MInfo}
    \eng{converts any symmetric function into a \Mex{m}-polynomial}
  \end{MInfo}
  
  \MDeclareOption{\Collect}{Collect}
  \MDeclareOption{\NoExpand}{NoExpand}
 
  \begin{MCalls}
    \Mcall{sf\Mopt{,b}\Mopt{,\Collect}\Mopt{,\NoExpand}}
  \end{MCalls}

  \begin{MParameters}
    \param{sf}
    \eng{any symmetric function}
    \param{b}
    \eng{converts only \Mex{b}-polynomials appearing in \Mex{sf}}
  \end{MParameters}
  \begin{MOptions}
    \option{\NoExpand}
    \eng{keeps the recursive structure of \Mex{sf}}
    \option{\Collect}
    \eng{expresses the result on the \Mex{m}-basis}
  \end{MOptions}

  \begin{MIntro}
    \eng{The {\Mthis} function converts any symmetric function into a
      \Mex{m}-polynomial.
      
      The symmetric function sf is expanded and the result is not
      collected.
      
      One may convert only \Mex{b}-polynomials of \Mex{sf} by adding
      the base \Mex{b} in the arguments.
      
      One may preserve the recursive structure of \Mex{sf} by adding
      the argument \Mex{\NoExpand}.
      
      One may collect the result by adding the argument \Mex{Collect}.
      The result will be collected in all \Mex{m}-polynomials
      appearing in \Mex{sf}.  }
\end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
muEC::SYMF::Tom( (s[2] - k*e[2])^2 * q - p[1]^3 );
\end{Mexin}
\begin{Mexout}
q m[4] + 3 q m[2, 2] + 2 q m[3, 1] + 4 q m[2, 1, 1] +

   6 q m[1, 1, 1, 1] - m[3] - 2 k q (m[3, 1] + m[2, 1, 1]) -

   2 k q (m[2, 2] + 2 m[2, 1, 1] + 6 m[1, 1, 1, 1]) +

    2                2                   2
   k  q m[2, 2] + 2 k  q m[2, 1, 1] + 6 k  q m[1, 1, 1, 1] -

   3 m[2, 1] - 6 m[1, 1, 1]
\end{Mexout}
% \begin{Mexout}[hide]
% m[3]*(-1) + q*m[4] + m[2, 1]*(-3) + q*m[2, 2]*3 + q*m[3, 1]*2 +
% m[1, 1, 1]*(-6) + q*m[2, 1, 1]*4 + k^2*q*m[2, 2] + q*m[1, 1, 1, 1] * 6 +
% k^2*q*m[2, 1, 1]*2 + k^2*q*m[1, 1, 1, 1]*6 + k*q*(m[3, 1] +
% m[2, 1, 1])*(-2) + k*q*(m[2, 2] + m[2, 1, 1]*2 + m[1, 1, 1, 1]*6)*(-2)
% \end{Mexout}
\begin{Mexin}
muEC::SYMF::Tom( (s[2] - k*e[2])^2 * q - p[1]^3, Collect );
\end{Mexin}
\begin{Mexout}
      2
(6 q k  - 12 q k + 6 q) m[1, 1, 1, 1] - 3 m[2, 1] -

                        2
   6 m[1, 1, 1] + (2 q k  - 6 q k + 4 q) m[2, 1, 1] +

       2
   (q k  - 2 q k + 3 q) m[2, 2] + (2 q - 2 k q) m[3, 1] -

   m[3] + q m[4]
\end{Mexout}
% \begin{Mexout}[hide]
% m[3]*(-1) + q*m[4] + m[2, 1]*(-3) + m[1, 1, 1]*(-6) +
% m[3, 1]*(q*2 + k*q*(-2)) + m[2, 2]*(q*3 + k*q*(-2) + k^2*q) +
% m[2, 1, 1]*(q*4 + k*q*(-6) + k^2*q*2) +
% m[1, 1, 1, 1]*(q*6 + k*q*(-12) + k^2*q*6)
% \end{Mexout}
\begin{Mexin}
muEC::SYMF::Tom( (s[2] - k*e[2])^2 * q - p[1]^3, Collect, NoExpand );
\end{Mexin}
\begin{Mexout}
                                        2       3
              q ((k - 1) m[1, 1] - m[2])  - m[1]
\end{Mexout}
% \begin{Mexout}[hide]
       % m[1]^3*(-1) + q*(m[2] + m[1, 1]*(k*(-1) + 1))^2
% \end{Mexout}
\begin{Mexin}
muEC::SYMF::Tom( (s[2] - k*e[2])^2 * q - p[1]^3, NoExpand, s );
\end{Mexin}
\begin{Mexout}
                                        2       3
             q (m[2] - k e[2] + m[1, 1])  - p[1]
\end{Mexout}
% \begin{Mexout}[hide]
      % p[1]^3*(-1) + q*(m[2] + k*e[2]*(-1) + m[1, 1])^2
% \end{Mexout}
\end{MExample}

\MRelatedFunctions{Toe,Toh,Top,Tos,SfAddBasis,Sf}
\end{Mhelppage}
