Ask Your Question

Revision history [back]

Here is a more natural way to do it:

sage: R.<y> = PowerSeriesRing(ZZ)
sage: R(b.polynomial().map_coefficients(lambda c: c.lift(), new_base_ring=ZZ))
1 + 3*y + 4*y^2
sage: R(b.polynomial().map_coefficients(lambda c: c.lift_centered(), new_base_ring=ZZ))
1 - 2*y - y^2