Opened 3 years ago

# Lazy laurent series — at Version 7

Reported by: Owned by: klee minor sage-8.8 algebra Kwankyu Lee N/A u/klee/27347 43ba7859f92d707e2f6f3cf93aafbc4f7f4b453a

Introduce lazy laurent series to Sage.

A lazy laurent series computes coefficients only when demanded or needed. In a sense, lazy laurent series are laurent series of infinite precision.

A generating function example from the code:

```Generating functions are laurent series over the integer ring::

sage: from sage.rings.lazy_laurent_series_ring import LazyLaurentSeriesRing
sage: L = LazyLaurentSeriesRing(ZZ, 'z')

This defines the generating function of Fibonacci sequence::

sage: def coeff(s, i):
....:     if i in [0, 1]:
....:         return 1
....:     else:
....:         return s.coefficient(i - 1) + s.coefficient(i - 2)
....:
sage: f = L.series(coeff, valuation=0); f
1 + z + 2*z^2 + 3*z^3 + 5*z^4 + 8*z^5 + 13*z^6 + ...

The 100th element of Fibonacci sequence can be obtained from the generating
function::

sage: f.coefficient(100)
573147844013817084101
```

Lazy laurent series is of course useful for other things. This will be used to implement infinite precision laurent series expansion of algebraic functions in function fields, as a sequel to #27418.

### comment:1 Changed 3 years ago by klee

• Branch set to u/klee/27347

### comment:2 Changed 3 years ago by git

• Commit set to 5d24a347b3f5bd6273bf678958c94d18b273b28f

Branch pushed to git repo; I updated commit sha1. New commits:

 ​5d24a34 `Introduce lazy laurent series`

### comment:3 Changed 3 years ago by klee

• Authors set to Kwankyu Lee
• Status changed from new to needs_review

### comment:4 Changed 3 years ago by git

• Commit changed from 5d24a347b3f5bd6273bf678958c94d18b273b28f to ace42826cd8782e1aee3c596707b33f5102291d6

Branch pushed to git repo; I updated commit sha1. New commits:

 ​ace4282 `pyflakes fixes`

### comment:5 Changed 3 years ago by git

• Commit changed from ace42826cd8782e1aee3c596707b33f5102291d6 to 389798e1d7057545c7914f1456e32f9c47aff5be

Branch pushed to git repo; I updated commit sha1. New commits:

 ​389798e `Add series method`

### comment:6 Changed 3 years ago by git

• Commit changed from 389798e1d7057545c7914f1456e32f9c47aff5be to 43ba7859f92d707e2f6f3cf93aafbc4f7f4b453a

Branch pushed to git repo; I updated commit sha1. New commits:

 ​43ba785 `Small fixes on docstrings`

### comment:7 Changed 3 years ago by klee

• Description modified (diff)
Note: See TracTickets for help on using tickets.