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

\begin{Mhelppage}{Top}%
  {V. Prosper}%
  \begin{MInfo}
    \eng{converts any symmetric function into a \Mex{p}-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{p}-basis}
  \end{MOptions}

  \begin{MIntro}
    \eng{The {\Mthis} function converts any symmetric function into a
      \Mex{p}-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{p}-polynomials
      appearing in \Mex{sf}.  }
  \end{MIntro}

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

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

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

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