Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Question about arguments of a polynomial

I want to define a polynomial ring R with 5 variables, and a function f belonging to R with 2 variables, for example, f=x1+x2,however, the arguments of f are just x1 and x2, how can I let the arguments of f be x0,x1,x2,x3,x4?

R=PolynomialRing(QQ,5,"x",order='lex')
vx=[var("x"+str(i))for i in range(5)]
vx=R.gens()
f=x1+x2;f
f.args()
g=R.random_element();g
g.args()

Question about arguments of a polynomial

I want to define a polynomial ring R with 5 variables, and a function f belonging to R with 2 variables, for example, f=x1+x2,however, the arguments of f are just x1 and x2, how can I let the arguments of f be x0,x1,x2,x3,x4?

R=PolynomialRing(QQ,5,"x",order='lex')
vx=[var("x"+str(i))for i in range(5)]
vx=R.gens()
f=x1+x2;f
f.args()
g=R.random_element();g
g.args()