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

\begin{Mhelppage}{SplitPart}{V. Prosper}%
  \begin{MInfo}
    \eng{splits a partition into several ones}
  \end{MInfo}
  

  \begin{MCalls}
    \Mcall{part\Mopt{,n}}
  \end{MCalls}

  \begin{MParameters}
    \param{part}
    \eng{a partition} 
    \param{n}
    \eng{a positive integer}
  \end{MParameters}

  \begin{MIntro}
    \eng{The {\Mthis} function returns the set of ways of splitting
      the partition \Mex{part} into two partitions.
 
      Called with a second argument \Mex{n}, the partition is splitted
      into \Mex{n} partitions, possibly empty.  }
  \end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
muEC::PART::SplitPart( [4,2,1] );
\end{Mexin}
\begin{Mexout}
{[[], [4, 2, 1]], [[1], [4, 2]], [[2], [4, 1]], [[4], [2, 1]],

   [[2, 1], [4]], [[4, 1], [2]], [[4, 2], [1]], [[4, 2, 1], []]

   }
\end{Mexout}
\begin{Mexin}
muEC::PART::SplitPart( [2,1], 3 );
\end{Mexin}
\begin{Mexout}
{[[], [], [2, 1]], [[], [1], [2]], [[], [2], [1]],

   [[], [2, 1], []], [[1], [], [2]], [[1], [2], []],

   [[2], [], [1]], [[2], [1], []], [[2, 1], [], []]}
\end{Mexout}
\end{MExample}

\MRelatedFunctions{TYP::IsPart}
\end{Mhelppage}
