### Series Reversion

I have a rational polynomial f(z) = P(z)/Q(z) which I want to revert (I'm trying to find the inverse of f).

I'll pick a simple example, the function f(z) = (1/z-1)^4

~~[sage:] ~~sage: z = ~~var('z');
[sage:] ~~var('z')
sage: z = FractionField(PolynomialRing(QQ, ~~'z')).objgen();
[sage:] ~~'z')).objgen()
sage: f(z) = ~~(1/z-1)^4;
[sage:] ~~(1/z-1)^4
sage: g = f(z).taylor(x,2,4); #I expand f in a Taylor series just to make sure it's a series
~~[sage:] f.expand().reversion();
~~sage: f.expand().reversion()
AttributeError: 'sage.symbolic.expression.Expression' object has ~~no
~~no attribute 'reversion'
~~[sage:] ~~sage: g1 = ~~g.power_series(QQ);
~~g.power_series(QQ)
TypeError: denominator must be a unit
~~[sage:] g.reversion();
~~sage: g.reversion()
AttributeError: 'sage.symbolic.expression.Expression' object has ~~no
~~no attribute 'reversion'

A power series P(z) is not a rational function P(z)/Q(z). That's why the

`TypeError: denominator must be a `~~unit ~~unit

appears.

Is it possible that ~~SAGE ~~Sage cannot invert rational polynomials? In the ~~SAGE ~~Sage help text the computation is passed to pari first, before using Lagrangian inversion.

I thought ~~SAGE ~~Sage uses FLINT. Why is it not used for computing the inverse of rational polynomials?