Ask Your Question

Revision history [back]

You could also work in the quotient ring of of your ring of polynomials by the ideal (x^3) as follows:

sage: R.<x> = PolynomialRing(QQ)
sage: S = R.quotient(R.ideal(x^3))
sage: f(x) = x+x^2+x^3+x^4
sage: S(f)
xbar^2 + xbar
sage: S(f).lift()
x^2 + x

In the expression for S(f) the variable xbar is the image of x in the quotient ring S.

You could also work in the quotient ring of of your ring of polynomials by the ideal (x^3) as follows:

sage: R.<x> = PolynomialRing(QQ)
sage: S = R.quotient(R.ideal(x^3))
sage: f(x) = x+x^2+x^3+x^4
sage: S(f)
xbar^2 + xbar
sage: S(f).lift()
x^2 + x

In the expression for S(f) the variable xbar is the image of x in the quotient ring S.

You could also work in the quotient ring of your ring of polynomials by the ideal (x^3) as follows:

sage: R.<x> = PolynomialRing(QQ)
sage: S = R.quotient(R.ideal(x^3))
sage: f(x) = x+x^2+x^3+x^4
sage: S(f)
xbar^2 + xbar
sage: S(f).lift()
x^2 + x

In the expression for S(f) the variable xbar is the image of x in the quotient ring S.

For another use of the lift method, see this question.