Dear List, I'm trying to substitute various expressions for the variables of symmetric polynomials returned by SymmetricFunctionAlgebra_generic(...).expand() but I can't figure out how to ask Sage to replace these variables or coerce them to some other polynomial ring. E.g.:
---------------------------------------------------------------------- | Sage Version 4.1.2, Release Date: 2009-10-14 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: R.<x0,x1,x2> = QQ['x0','x1','x2'] sage: x3=-(x0+x1+x2) sage: e = SFAElementary(QQ) sage: e([1]).expand(4) x0 + x1 + x2 + x3 sage: e([1]).expand(4,alphabet=[x0,x1,x2,x3]) <snip long error trace> ValueError: variable names must be alphanumeric, but one is '-x0 - x1 - x2' which is not. sage: e([1]).expand(4).subs([x0,x1,x2,x3]) <snip another long error trace> AttributeError: 'list' object has no attribute 'iteritems' sage: e([1]).expand(4).subs({x0:x0,x1:x1,x2:x2,x3:x3,x4:x4}) --------------------------------------------------------------------------- NameError Traceback (most recent call last) /usr/src/local/sage-4.1.2/<ipython console> in <module>() NameError: name 'x4' is not defined sage: R(e([1]).expand(4)) <snip huge error trace> TypeError: not a constant polynomial I think it should be quite obvious what I'm trying to do there (the result should be 0, of course). How can I make it work? Evidently e([1]).expand(4) returns a polynomial constructed of variables x0,x1,x2,x3 which are not my x0,x1,x2 and x3. How can I force it to use my variables x0,x1,x2,x3? And, more generally, given a list of elements in a ring, how can I efficiently (in terms of number of keystrokes!) compute the elementary symmetric functions of these elements? Thanks in advance, -- David A. Madore ( http://www.madore.org/~david/ ) --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---