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

\begin{Mhelppage}{SfCollect}%
  {V. Prosper}%
  \begin{MInfo}
    \eng{collects products that are on algebraic bases (\Mex{e, h, p})
      and expands products on linear bases (\Mex{m, s})}
  \end{MInfo}
  

  \begin{MCalls}
    \Mcall{sf\Mopt{,b}\Mopt{,blist}}
  \end{MCalls}

  \begin{MParameters}
    \param{sf}
    \eng{a linear combination of products of symmetric functions}
    \param{b}
    \eng{a basis} 
    \param{blist}
    \eng{a list of bases} 
  \end{MParameters}

  \begin{MIntro}
    \eng{The {\Mthis} function transforms products of power sums,
      elementary and complete functions into a valid \Mex{SYMF}
      expression.
      
      Special algorithms are used for products of monomial symmetric
      functions and products of Schur functions.
      
      The {\Mthis} function also normalizes indexing vectors of each
      symmetric function.
      
      Valid bases are \Mex{SYMF::SYMFBases}. They all are considered
      by default.
 
      One may specify to collect products (and / or normalize indexing
      vectors) expressed only on specified bases by adding a second
      argument which is either a single basis or a list of bases.  }
  \end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
muEC::SYMF::SfCollect( p[3]^4 * e[2] * e[1] - q*s[2]^2 );
\end{Mexin}
\begin{Mexout}
     e[2, 1] p[3, 3, 3, 3] - q (s[4] + s[2, 2] + s[3, 1])
\end{Mexout}
% \begin{Mexout}[hide]
  % q*(s[4] + s[2, 2] + s[3, 1])*(-1) + e[2, 1]*p[3, 3, 3, 3]
% \end{Mexout}
\begin{Mvin}{test=false}
muEC::SYMF::SfCollect( p[1,2]^2 - q*m[1,0,0]^2*s[1,3]^2, [ s, m ] );
\end{Mvin}
\begin{Mvout}{test=false}
       2
p[1, 2]  - 2 q (m[2] + 2 m[1, 1])

   (s[4, 4] + s[4, 2, 2] + s[4, 3, 1] + s[2, 2, 2, 2] +

   s[3, 2, 2, 1] + s[3, 3, 1, 1])
\end{Mvout}
% \begin{Mexout}[hide]
% p[1, 2]^2 + q*(m[2] + m[1, 1]*2)*(s[4, 4] + s[4, 2, 2] + s[4, 3, 1] +
% s[2, 2, 2, 2] + s[3, 2, 2, 1] + s[3, 3, 1, 1])*(-1)
% \end{Mexout}
\begin{Mexin}
muEC::SYMF::SfCollect( p[1,2]^2 - q*m[1,0,0]^2*s[1,3]^2, p );
\end{Mexin}
\begin{Mexout}
                                     2           2
            p[2, 2, 1, 1] - q s[1, 3]  m[1, 0, 0]
\end{Mexout}
% \begin{Mexout}[hide]
        % p[2, 2, 1, 1] + q*s[1, 3]^2*m[1, 0, 0]^2*(-1)
% \end{Mexout}
\end{MExample}

\MRelatedFunctions{SFA::SfACollect,Toe,Toh,Top,Tom,Tos}
\end{Mhelppage}
