Opened 3 years ago
Last modified 3 years ago
#27347 closed enhancement
Lazy laurent series — at Version 7
Reported by:  klee  Owned by:  

Priority:  minor  Milestone:  sage8.8 
Component:  algebra  Keywords:  
Cc:  Merged in:  
Authors:  Kwankyu Lee  Reviewers:  
Report Upstream:  N/A  Work issues:  
Branch:  u/klee/27347 (Commits, GitHub, GitLab)  Commit:  43ba7859f92d707e2f6f3cf93aafbc4f7f4b453a 
Dependencies:  Stopgaps: 
Description (last modified by )
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.
Change History (7)
comment:1 Changed 3 years ago by
 Branch set to u/klee/27347
comment:2 Changed 3 years ago by
 Commit set to 5d24a347b3f5bd6273bf678958c94d18b273b28f
comment:3 Changed 3 years ago by
 Status changed from new to needs_review
comment:4 Changed 3 years ago by
 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
 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
 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
 Description modified (diff)
Branch pushed to git repo; I updated commit sha1. New commits:
Introduce lazy laurent series