Sorry to reply to myself, here is what I really want to do. continuing my last post I will put the entire code again).
sage: R=PolynomialRing(QQ,2,'z') sage: z=R.gens() sage: x=tuple([z[0]]) sage: p=SFAPower(QQ) sage: f=p([2,1]).expand(1,alphabet=x) sage: f z0^3 sage: f in R False sage: f==z[0]^3 True sage: z[0]^3 in R True sage: y=tuple([z[1]]) sage: g=p([2,1]).expand(1,alphabet=y) sage: g z1^3 sage: f*g --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/arattan/Sage/<ipython console> in <module>() /usr/local/sage-3.4/local/lib/python2.5/site-packages/sage/structure/ element.so in sage.structure.element.RingElement.__mul__ (sage/ structure/element.c:9813)() /usr/local/sage-3.4/local/lib/python2.5/site-packages/sage/structure/ coerce.so in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:6584)() TypeError: unsupported operand parent(s) for '*': 'Multivariate Polynomial Ring in z0 over Rational Field' and 'Multivariate Polynomial Ring in z1 over Rational Field' sage: ---------------------------------------- Basically, I want to be able to multiply f and g and I can't, probably because they are not recognized as being in the same polynomial ring. On 30 May, 11:30, amps <arat...@gmail.com> wrote: > Hello, > > I am wondering how to coerce a symmetric function in a certain number > of variables into a polynomial ring with larger variables. I am > getting some rather confusing output. > > ---------------------------------------------------------------------- > | Sage Version 3.4.2, Release Date: 2009-05-05 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > sage: R=PolynomialRing(QQ,2,'z') > sage: z=R.gens() > sage: x=tuple([z[0]]) > sage: x > (z0,) > sage: p=SFAPower(QQ) > sage: f=p([2,1]).expand(1,alphabet=x) > sage: f in R > False > sage: f > z0^3 > sage: f==z[0]^3 > True > sage: z[0]^3 in R > True > sage: > > -------------------------------------------------------- > > as you can see, f seems to be both in and not in R. I want the > polynomial to be a symmetric polynomial in a subset of variables in > the ring R. --~--~---------~--~----~------------~-------~--~----~ 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 URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---