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

\begin{Mhelppage}{PartOrderMat}{V. Prosper}%
  \begin{MInfo}
    \eng{order matrix on partitions}
  \end{MInfo}
  
  \MDeclareOption{\order}{order}
  
  \begin{MCalls}
    \Mcall{n\Mopt{,\order}}
  \end{MCalls}

  \begin{MParameters}
    \param{n}
    \eng{an integer} 
  \end{MParameters}
  \begin{MOptions}
    \option{\order=natural,lexic,cixel}
  \end{MOptions}

  \begin{MIntro}
    \eng{The {\Mthis} function gives the order matrix on all
      partitions of \Mex{ListPart(n)}.
      
      The considered ordering is given by the second argument kind:
      \begin{itemize}
        \item
        {\Mex{natural}}:
        \Mmath{\Mex{part1} >= \Mex{part2}}{\mathtt{part1}\ge\mathtt{part2}} if
        \Mmath{sum\_\Mex{part1}<=sum\_\Mex{part2}}%
        {\sum_{\mathtt{part1}}\le\sum_{\mathtt{part2}}}
        for the lexicographic ordering
        (\Mmath{sum\_I=[I[1], I[1]+I[2], I[1]+I[2]+I[3], ...]}%
        {\sum_I=[I_1, I_1+I_2, I_1+I_2+I_3,...]}).
        \item
        {\Mex{lexic}}:
        \Mmath{\Mex{part1} >= \Mex{part2}}{\mathtt{part1}\ge\mathtt{part2}}
        for the lexicographic ordering.
        \item
        {\Mex{cixel}}:
        \Mmath{\Mex{part1} >= \Mex{part2}}{\mathtt{part1}\ge\mathtt{part2}}
        for the inverse lexicographic ordering.
      \end{itemize}
 
      Without a third argument, the comparison is assumed to be
      \Mex{natural}.
      
      The inverse matrix for this order is known as the Moebius
      matrix.}
  \end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
muEC::PART::PartOrderMat( 6 );
\end{Mexin}
\begin{Mexout}
             +-                                 -+
             |  1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0  |
             |                                   |
             |  1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0  |
             |                                   |
             |  1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0  |
             |                                   |
             |  1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0  |
             |                                   |
             |  1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0  |
             |                                   |
             |  1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0  |
             |                                   |
             |  1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0  |
             |                                   |
             |  1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0  |
             |                                   |
             |  1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0  |
             |                                   |
             |  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0  |
             |                                   |
             |  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1  |
             +-                                 -+
\end{Mexout}
\begin{Mexin}
Dom::Matrix()( % )^(-1);
\end{Mexin}
\begin{Mexout}
        +-                                           -+
        |   1,  0,  0,  0,  0,  0,  0,  0,  0,  0, 0  |
        |                                             |
        |  -1,  1,  0,  0,  0,  0,  0,  0,  0,  0, 0  |
        |                                             |
        |   0, -1,  1,  0,  0,  0,  0,  0,  0,  0, 0  |
        |                                             |
        |   0,  0, -1,  1,  0,  0,  0,  0,  0,  0, 0  |
        |                                             |
        |   0,  0, -1,  0,  1,  0,  0,  0,  0,  0, 0  |
        |                                             |
        |   0,  0,  1, -1, -1,  1,  0,  0,  0,  0, 0  |
        |                                             |
        |   0,  0,  0,  0,  0, -1,  1,  0,  0,  0, 0  |
        |                                             |
        |   0,  0,  0,  0,  0, -1,  0,  1,  0,  0, 0  |
        |                                             |
        |   0,  0,  0,  0,  0,  1, -1, -1,  1,  0, 0  |
        |                                             |
        |   0,  0,  0,  0,  0,  0,  0,  0, -1,  1, 0  |
        |                                             |
        |   0,  0,  0,  0,  0,  0,  0,  0,  0, -1, 1  |
        +-                                           -+
\end{Mexout}
\begin{Mexin}
muEC::PART::PartOrderMat( 4, cixel );
\end{Mexin}
\begin{Mexout}
                      +-               -+
                      |  1, 1, 1, 1, 1  |
                      |                 |
                      |  0, 1, 0, 1, 1  |
                      |                 |
                      |  0, 1, 1, 1, 1  |
                      |                 |
                      |  0, 0, 0, 1, 1  |
                      |                 |
                      |  0, 0, 0, 0, 1  |
                      +-               -+
\end{Mexout}
\end{MExample}

\MRelatedFunctions{CompPart,ListPart}
\end{Mhelppage}
