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
Hi Tom,
Your code works perfectly in Sage 6.2 on Mac
R. = PolynomialRing(ZZ,3)
C. = 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)
return e(f)
p =