FUNCTION: LieTools/PolySplit
USAGE: PolySplit(f,X);
SYNOPSIS: PolySplit(f,X) splits up a polynomial f in variables of the form X[i1,...,i_k] 
  and produces as output a two item list:
           [coeffs,monos]
  where coeffs is a list of the coefficients of f and monos is a list of the
  (corresponding) monic monomials appearing in f.
CAVEATS: requires a previously initialized global Lie algebra environment.
  (See LieTools[gSetup].)
EXAMPLE: 
> f := expand((1+a[1]*g[1] + a[2]*g[2] + a[3]*g[2])^2);

                                                         2     2
  f := 1 + 2 a[1] g[1] + 2 a[2] g[2] + 2 a[3] g[2] + a[1]  g[1]

         + 2 a[1] g[1] a[2] g[2] + 2 a[1] g[1] a[3] g[2]

               2     2              2            2     2
         + a[2]  g[2]  + 2 a[2] g[2]  a[3] + a[3]  g[2]

> PolySplit(f,`g`);

                                    2
  [[1, 2 a[1], 2 a[2] + 2 a[3], a[1] , 2 a[1] a[2] + 2 a[1] a[3],

            2                     2
        a[2]  + 2 a[2] a[3] + a[3] ],

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

SEE ALSO: LieTools[SgPolySplit], LieTools[UgPolySplit]
