Ask Your Question

Revision history [back]

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