% $Date: 2003/09/15 16:37:46 $ $Author: nthiery $ $Revision: 1.1.1.1 $

\begin{Mhelppage}{SfAddBasis}{V. Prosper}

  \begin{MInfo}
    \eng{addition of a new basis}
  \end{MInfo}

  \begin{MCalls}
    \Mcall{b\Mopt{,scal,leadcoeff}}
  \end{MCalls}

  \begin{MParameters}
    \param{b}
    \eng{any name}
    \param{scal}
    \eng{any procedures accepting a partition as input}
    \param{leadcoeff}
    \eng{any procedures accepting a partition as input}
  \end{MParameters}

  \begin{MIntro}
    \eng{The  function
\Mmath{\Mex{part} -> \Mex{scal(part)}}{\mathtt{part}\to\mathtt{scal(part)}}
chosen  by the user defines a  scalar product \Mmath{<,>}{\langle~,~\rangle}
on symmetric functions for which power sums are orthogonal, and such that
\Mdmath{<\Mex{p[part], p[part]}> = \Mex{scal(part)}.}%
      {\langle\mathtt{p[part], p[part]}\rangle = \mathtt{scal(part)}.}
The  usual scalar product \Mup{SfScalar} corresponds to
\Mex{scal(part) = \Mup{SfZee}(part)}.

There exists a unique basis \Mex{b} of the linear space of symmetric
functions that is orthogonal and satisfies:
\Mdmath{%
  \Mex{b[part]}  =  \Mex{leadcoeff(part)} x \Mex{m[part]} + combination of
  \Mex{m[mu]}, \Mex{mu}<\Mex{part},%
}{%
\mathtt{b[part]  =  leadcoeff(part)\times m[part]} +
                    \mathrm{combination~of~m[\mu]}, \mu<\mathtt{part},%
}
(with respect to the total order on partitions listed with the
      \Mup[PART,ListPart]{ListPart} function).
 
      By default, the leading coefficient is set equal to 1, i.e.  is
      the function which returns 1 whatever is its argument:
      \Mex{proc(part) begin 1 end\_proc}.
 
      The new basis \Mex{b} is added to the list of bases and will be
      recognized in any expression; a new procedure \Mex{Tob} is
      available, with the same syntax as for instance \Mup{Tom},
      \Mup{Tos}, and is devoted to express any symmetric function in
      the \Mex{b}-basis.
 
      It has also the effect to define a \Mex{Isb} function that tests
      whether an expression is an element of the \Mex{b}-basis.
    
      The result is the current set of known bases.
    
      An error is produced if \Mex{b} is the name of a previously
      defined basis.  }
  \end{MIntro}
 
\begin{MExample}{ex1}
\begin{Mexin}
NewZee := proc(part) begin SfZee(part, q, t) end_proc:
\end{Mexin}
\begin{Mexout}
                               
\end{Mexout}
% \begin{Mexout}[hide]
  % proc(part) name NewZee; begin SfZee(part, q, t) end_proc
% \end{Mexout}
\begin{Mexin}
muEC::SYMF::SfAddBasis( Mac, NewZee ); # ~ Macdonald polynomials #
\end{Mexin}
\begin{Mexout}
                     [p, s, e, h, m, Mac]
\end{Mexout}
\begin{Mexin} 
map( Tom(Mac[2]*s[2,1], Collect), Factor );
\end{Mexin} 
\begin{Mexout}
           (2 t q + t - q - 2) m[3, 2]     (2 t q + t - q - 2) m[3, 1, 1]
 m[4, 1] + --------------------------- + 2 ------------------------------
                     t q - 1                           t q - 1

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

          (9 t + 11 t q - 9 q - 11) m[2, 1, 1, 1]
        + ---------------------------------------
                          t q - 1

             (- 1 + t) (q + 1) m[1, 1, 1, 1, 1]
        + 20 ----------------------------------
                           t q - 1
\end{Mexout}
% \begin{Mexout}[hide]
                           % null()
% \end{Mexout}
\begin{Mexin} 
map( ToMac(Mac[2]*s[1], Collect), Factor );
\end{Mexin} 
\begin{Mexout}
                             2
                 (q + 1) (q t  - 1) (- 1 + q) Mac[2, 1]
        Mac[3] + --------------------------------------
                            2
                          (q  t - 1) (t q - 1)
\end{Mexout}
% \begin{Mexout}[hide]
                           % null()
% \end{Mexout}
\begin{Mexin} 
map( SfMat(3, Mac, m), Factor );
\end{Mexin} 
\begin{Mexout}
           [                 2                   2 ]
           [       (q + 1) (q  + q + 1) (- 1 + t)  ]
           [ 1  0  ------------------------------- ]
           [               2                       ]
           [             (q  t - 1) (t q - 1)      ]
           [                                       ]
           [        (2 t q + t + q + 2) (- 1 + t)  ]
           [ 0  1   -----------------------------  ]
           [                      2                ]
           [                   q t  - 1            ]
           [                                       ]
           [ 0  0                 1                ]
\end{Mexout}
% \begin{Mexout}[hide]
                           % null()
% \end{Mexout}
\end{MExample}

\MRelatedFunctions{SfDualBasis,SfMat,SfScalar,SfZee}
\end{Mhelppage}
