FUNCTION: LieTools/Restrict2H
USAGE: Restrict2H(gpoly);
SYNOPSIS: Restric2H(gpoly) yields the restriction of a polynomial gpoly
  in S(g) to the Cartan subalgebra H.
CAVEATS: requires a previously initialized global Lie algebra environment.
  (See LieTools[gSetup].)
EXAMPLE: 
> with(LieTools):
> gSetup(G,2);
Setting up Gtype = G   rnk = 2
> c2 := add(add(BI[i,j]*g[i]*g[j],i=1..dimg),j=1..dimg);

  c2 := 1/4 g[1] g[14] + 1/4 g[2] g[13] + 1/12 g[3] g[12]

         + 1/12 g[4] g[11] + 1/4 g[10] g[5] + 1/12 g[6] g[9]

                    2                           2
         + 1/12 g[7]  + 1/4 g[8] g[7] + 1/4 g[8]

> Restrict2H(c2);

                         2                           2
                1/12 g[7]  + 1/4 g[8] g[7] + 1/4 g[8]

SEE ALSO: 
