Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question
2

How does one add new variables to a multivariate polynomial ring?

asked 10 years ago

Kirill gravatar image

If I try this, it fails:

R.<x,y> = PolynomialRing(QQ, 'x, y')
R.extend_variables('z')
AttributeError: 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular' object has no attribute 'extend_variables'

(But a univariate polynomial ring PolynomialRing(QQ, 'x') has an extend_variables function.)

How do I take a polynomial ring R and make a new ring R with more variables, such that RR?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
3

answered 10 years ago

slelievre gravatar image

You can create a new polynomial ring with variables having the same names.

sage: R.<x,y> = PolynomialRing(QQ)
sage: S = PolynomialRing(QQ,'x,y,z')

Then it's easy to move from R to S:

sage: p = R.random_element(); p
sage: q = S(p); q
Preview: (hide)
link

Comments

Thank you. I think I can't upvote due to not having any reputation.

Kirill gravatar imageKirill ( 10 years ago )

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: 10 years ago

Seen: 1,044 times

Last updated: Aug 21 '14