Hi Anne,

Nicolas M. Thiery wrote:
> On Sat, Feb 13, 2010 at 09:53:27AM -0800, Anne Schilling wrote:
>> I would like to write a symmetric polynomial (not function)
>> in terms of one of the usual bases (like Schur polynomials).

> That's a quite basic feature, that we ought to have (that was fromPoly
> in MuPAD-Combinat). But I fear we don't. At least I could not find it
> browsing through the sources.

I don't know of the existence of such a function.   I've written a very
quick-and-dirty (and very minimally tested) function below.  If someone
opens a ticket, I will try to get a proper version of this into sage at
some point.

Cheers,
Jason

def toSF(f):
    """ Input is a symmetric polynomial in a polynomial ring in finitely
    many variables.  Output is a symmetric function in the monomial
    basis of the ring of symmetric functions over the same base ring.
    """
    X = f.parent().gens()
    n = f.parent().ngens()
    SF = SymmetricFunctions(f.base_ring())
    m = SF.monomial()
    out = m(0)
    while f != 0:
        lt = f.lt()
        c = lt.monomial_coefficient(lt)
        p = Partition(lt.exponents()[0])
        f += -m(p).expand(n,X)
        out += c*m(p)
    return out

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

Reply via email to