id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
27347 Lazy Laurent series klee "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." enhancement closed minor sage-8.8 algebra fixed Kwankyu Lee Travis Scrimshaw N/A 989f009a851c9dc91c8650d7e554138886951a3a