I too needed some code to compute with Demazure characters using the
weight ring.
I agree that this is useful independent of the Demazure characters as
implemented
in the crystal code.

What we did was just to make a standalone program that did what we
needed, but it would make a good enhancement to sage.
I think the right way would be as a method of the weight ring.
So the syntax would be

ch.demazure_character(w)

where ch is a weight ring element and w is an element of the Weyl
group.
There could be a helper method

ch._demazure_character(i)

that would produce the operator corresponding to the i-th simple
reflection.
It would do something like this:

    def _demazure(self, i):
        a = self._parent.space().simple_coroots()[i]
        ret = self._parent(0)
        d = self._mdict
        for t in d.keys():
            k = t.inner_product(a)
            if k >= 0:
                ret += d[t]*sum(self._parent(t-j*a) for j in range(k
+1))
            else:
                ret += -d[t]*sum(self._parent(t+j*a) for j in
range(1,k))
        return ret

This helper method would then be called by the method demazure,
which would use the reduced_word method of Weyl group elements
to to produce a sequence of called to the helper method.

The plot method for WeightRingElements, just for rank two, would
also be very useful.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to