Ask Your Question

Revision history [back]

If I understood you correctly:

sage: R.<x,y,z> = PolynomialRing(QQ)
sage: f = x^2*(x + y + z + 1) + x^3*(y^2 + z^2 + 1); f
x^3*y^2 + x^3*z^2 + 2*x^3 + x^2*y + x^2*z + x^2
sage: g = x^min(e[0] for e in f.exponents()); g
x^2
sage: h = f // g; h
x*y^2 + x*z^2 + 2*x + y + z + 1
sage: f == g*h
True