Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are multiple ways to do so - here are just two options:

1) Via polynomial ideals and reduction:

R.<x,y,u> = QQ[]
f = x^2 + x^4 * y + y^3 + 1
J = ideal([x^2 - u])
g = J.reduce(f)

2) Via symbolic variables/substitution:

var('x y u')
f = x^2 + x^4 * y + y^3 + 1
w = SR.wild(0)
g = f.subs({x^w:u^floor(w/2)*x^(w-2*floor(w/2))})

There are multiple ways to do so - here are just two options:

1) Via polynomial ideals and reduction:

R.<x,y,u> = QQ[]
PolynomialRing(QQ, order='lex')
f = x^2 + x^4 * y + y^3 + 1
J = ideal([x^2 - u])
g = J.reduce(f)

2) Via symbolic variables/substitution:

var('x y u')
f = x^2 + x^4 * y + y^3 + 1
w = SR.wild(0)
g = f.subs({x^w:u^floor(w/2)*x^(w-2*floor(w/2))})