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