Return the coefficients in a \(\pi\)-adic expansion.
If this is a field element, start at
\(\pi^{\mbox{valuation}}\), if a ring element at \(\pi^0\).

For each lift mode, this function returns a list of \(a_i\) so
that this element can be expressed as

\[\pi^v \cdot \sum_{i=0}^\infty a_i \pi^i\]

where \(v\) is the valuation of this element when the parent is
a field, and \(v = 0\) otherwise.

Different lift modes affect the choice of \(a_i\). When
lift_mode is 'simple', the resulting \(a_i\) will be
non-negative: if the residue field is \(\GF{p}\) then they
will be integers with \(0 \le a_i < p\); otherwise they will be
a list of integers in the same range giving the coefficients
of a polynomial in the indeterminant representing the maximal
unramified subextension.

Choosing lift_mode as 'smallest' is similar to
'simple', but uses a balanced representation \(-p/2 < a_i
\le p/2\).

Finally, setting lift_mode='teichmuller' will yield
Teichmuller representatives for the \(a_i\): \(a_i^q = a_i\). In
this case the \(a_i\) will lie in the ring of integers of the
maximal unramified subextension of the parent of this element.

INPUT:

n – integer (default None). If given, returns the corresponding
entry in the expansion. Can also accept a slice (see slice())

lift_mode – 'simple', 'smallest' or
'teichmuller' (default: 'simple')

start_val – start at this valuation rather than the
default (\(0\) or the valuation of this element).

OUTPUT:

If n is None, an iterable giving a \(\pi\)-adic expansion of this
element. For base elements the contents will be integers if
lift_mode is 'simple' or 'smallest', and
elements of self.parent() if lift_mode is
'teichmuller'.

If n is an integer, the coefficient of \(\pi^n\) in the
\(\pi\)-adic expansion of this element.