[sage-support] Re: Symmetric polynomials over a ring of polynomials

2014-08-19 Thread slelievre
Le samedi 24 mai 2014 16:29:38 UTC+2, Tom Harris a écrit : Now I have some code to generate the polynomial which I am interested in, I store it as p: p = (output of some functions) ( p is ((x1^3 - 2*x1*x2 + x3)*c1^2 - (x1*x2 - x3)*c1 + x3)*c2^2 + x1^3 + c1^2*x3 - (x1*x2 - x3)*c1 -

[sage-support] Re: Symmetric polynomials over a ring of polynomials

2014-08-11 Thread Oleksandr Kazymyrov
Hi Tom, Your code works perfectly in Sage 6.2 on Mac R.x1,x2,x3 = PolynomialRing(ZZ,3) C.c1,c2 = PolynomialRing(R,2) Sym = SymmetricFunctions(R) e = Sym.elementary() def ElemSym(p): # checks whether a polynomial is symmetric (coefficients in ZZ[l1,l2,l3]) f = Sym.from_polynomial(p)