FUNCTION: LieTools/PBWEvalOnHW
USAGE: PBWEvalOnHW(upoly,hfw)
SYNOPSIS: PBWEvalOnHW(upoly,hfw) will yield the evaluation of an element
  upoly in U[g] on a highest weight hfw (which should be expressed in
  terms of a basis of fundamental weights. More precisely, if upoly|hfw> 
  reduces, via a PBW expansion, to a vector of the form u|hfw> tben 
  PBWEvalOnHW returns
         - 0 if u lies in U(n+),
         - u if u lies in U(n-),
         - u(hfw) if u lies in U(h) =~ S(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
> PBWEvalOnHW(u(g[dimg],g[dimg]),[-1/2,-1/2]);

                                  0

> PBWEvalOnHW(u(g[1],g[1]),[-1/2,-1/2]);

                            u(g[1], g[1])

> 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]

> C2 := NormalOrder(c2);

  C2 := 1/4 u(g[1], g[14]) + 1/4 u(g[2], g[13]) + 1/12 u(g[3], g[12])

         + 1/12 u(g[4], g[11]) + 1/4 u(g[5], g[10])

         + 1/12 u(g[6], g[9]) + 1/12 u(g[7], g[7])

         + 1/4 u(g[7], g[8]) + 1/4 u(g[8], g[8])

> PBWEvalOnHW(C2,[-1/2,-1/2]);

                                 7/48


SEE ALSO: 
