FUNCTION: LieTools/SgEvalFunc
USAGE:  SgEvalFunc(gpoly,gvector);
SYNOPSIS: This is a function that evaluates a function on a vector in g. Abusing 
  notation for the sake of expediency, we use linear functions in S[g] as "basis 
  vectors" for g.
CAVEATS: requires a previously initialized global Lie algebra environment.
  (See LieTools[gSetup].)
EXAMPLE: 
> with(LieTools):

> gpoly := g[1]^2+2*g[1]*g[2]+g[2]^2;
                              2                     2
                 gpoly := g[1]  + 2 g[2] g[1] + g[2]

> SgEvalFunc(gpoly,a*g[1]+b*g[2]);

                            2            2
                           a  + 2 a b + b

SEE ALSO: LieTools[SgEvalOnHRt], LieTools[SgEvalOnPrNil]
