Ask Your Question
0

Question about arguments of a polynomial

asked 2014-07-13 16:50:46 +0100

ruidongshuai@gmail.com gravatar image

updated 2014-07-13 19:11:40 +0100

slelievre gravatar image

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()
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-07-13 17:49:15 +0100

slelievre gravatar image

To have x0, ..., x4 refer to the generators of R, replace your second and third lines by

R.inject_variables()
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-07-13 16:50:46 +0100

Seen: 224 times

Last updated: Jul 13 '14