# Lifting polynomials

Hello!

I have this polynomial 'fp' that I'd lite to lift to ZZ. How do I go about doing something like this in Sage online?

Univariate Quotient Polynomial Ring in y over Ring of integers modulo 127 with modulus Y^23 + 126
fp=y^21 + 126*y^19 + y^17 + 126*y^16 + y^15 + y^14 + y^13 + y^12 + y^9 + 126*y^8 + 126*y^5 + 126*y^4 + 126*y^2 + 126*y +  1

Univariate Polynomial Ring in X over Integer Ring
Q.<X> = PolynomialRing(ZZ)


Best regards!

edit retag close merge delete

Sort by » oldest newest most voted

It's a two-step process. First you need to lift in $\mathbb{Z}/27\mathbb{Z}[y]$, then lift the coefficients in $\mathbb{Z}$:

fp.lift().change_ring(ZZ)


Or, if you want the result to live in your polynomial ring Q of variable X

Q(fp.lift())

more

are you positive about this? I'm a bit confused as my Polynomial ring Q is defined by the variable 'X'(as shown above) and the variable in fp is 'y'. should't the answer be a polynomial with 'X'? my answer is show in his ring Qp.<y> = PolynomialRing(Zmod(p)).

Edited my answer. Is this closer to what you were looking for?