Changes between Initial Version and Version 7 of Ticket #27347


Ignore:
Timestamp:
03/04/19 09:10:49 (23 months ago)
Author:
klee
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27347

    • Property Status changed from new to needs_review
    • Property Commit changed from to 43ba7859f92d707e2f6f3cf93aafbc4f7f4b453a
    • Property Branch changed from to u/klee/27347
    • Property Authors changed from to Kwankyu Lee
  • Ticket #27347 – Description

    initial v7  
    11Introduce lazy laurent series to Sage.
     2
     3A lazy laurent series computes coefficients only when demanded or needed. In a sense, lazy laurent series are laurent series of infinite precision.
     4
     5A generating function example from the code:
     6{{{
     7Generating functions are laurent series over the integer ring::
     8
     9    sage: from sage.rings.lazy_laurent_series_ring import LazyLaurentSeriesRing
     10    sage: L = LazyLaurentSeriesRing(ZZ, 'z')
     11
     12This defines the generating function of Fibonacci sequence::
     13
     14    sage: def coeff(s, i):
     15    ....:     if i in [0, 1]:
     16    ....:         return 1
     17    ....:     else:
     18    ....:         return s.coefficient(i - 1) + s.coefficient(i - 2)
     19    ....:
     20    sage: f = L.series(coeff, valuation=0); f
     21    1 + z + 2*z^2 + 3*z^3 + 5*z^4 + 8*z^5 + 13*z^6 + ...
     22
     23The 100th element of Fibonacci sequence can be obtained from the generating
     24function::
     25
     26    sage: f.coefficient(100)
     27    573147844013817084101
     28}}}
     29
     30Lazy 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.