Ask Your Question

Revision history [back]

click to hide/show revision 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