4.10.2.1 PowerSeries Objects

class PowerSeries
PowerSeries( parent, prec, [is_gen=False])

Instances of class PowerSeries have the following methods (in addition to inherited methods and special methods):

add_bigoh,$  $ O,$  $ prec,$  $ trunc,$  $ unit_part,$  $ V

These methods are defined as follows:

add_bigoh( prec)

Returns the power series of precision at most prec got by adding $ O(q^{
m prec})$ to f, where q is the variable.

O( prec)

Return this series plus $ O(x^{
m prec})$ . Does not change self.

prec( )

The precision of $ ...+O(x^r)$ is by definition $ r$ .

trunc( [prec=Infinity])

Polynomial obtained from power series by truncating.

unit_part( )

Suppose self factors as $ q^n\cdot (a_0 + a_1 q + \cdots)$ with $ a_0$ nonzero. Then this function returns $ a_0 + a_1 q +
\cdots $ .

V( n)

If $ f = \sum a_m x^m$ , then this function returns $ \sum a_m x^{nm}$ .

Instances of class PowerSeries also have the following special methods:

__cmp__( other)

Comparison of self and other.

We say two approximate power series are equal, if they agree for all coefficients up to the *minimum* of the precisions of each. Thus, e.g., $ f=1+q+O(q^2)$ is equal to $ g=1+O(q)$ . This is how PARI defines equality of power series, but not how MAGMA defines equality. (MAGMA would declare f and g unequal.) I side with PARI, because even if $ g=1+q+O(q^2)$ , we don't really know whether f equals g, since we don't know the coefficients of $ q^2$ .

__invert__( )

Inverse of the power series, which we assume to have nonzero constant term so that the inverse is again a power series.

See About this document... for information on suggesting changes.