| 1 | initial version |
Let say we have
R.<x> = QQ[]
f = x^2 + x + 1
My ugly solution is a conversion:
g = PolynomialRing( f.base_ring(), 2, str(f.variables()[0]) + ',dummy' )(f)
for which we have:
print(g.parent())
Multivariate Polynomial Ring in x, dummy over Rational Field
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.