Opened 4 years ago

Closed 4 years ago

#19532 closed enhancement (fixed)

asymptotic expansion generators related to singularity analysis

Reported by: dkrenn Owned by:
Priority: major Milestone: sage-7.1
Component: asymptotic expansions Keywords:
Cc: behackl, cheuberg Merged in:
Authors: Daniel Krenn Reviewers: Clemens Heuberger
Report Upstream: N/A Work issues:
Branch: a4eaf82 (Commits) Commit: a4eaf8251242fe1bd2bbfd4695e126cc01edcd3f
Dependencies: #19437, #19510, #19576, #19946, #19898 Stopgaps:

Description (last modified by cheuberg)

Create asymptotic expansions coming from pole singularities.

Change History (35)

comment:1 Changed 4 years ago by dkrenn

  • Branch set to u/dkrenn/asy/singularity-analysis

comment:2 Changed 4 years ago by dkrenn

  • Commit set to 3214c83c3a91f0eea73ad0068473661b1c228bfc

Implemented pole singularities.


Last 10 new commits:

e93ce46simplify coefficients automatically and use the faster algorithm per default
f468de6docu
4a27e66result over QQ if skip-parameter given
e59c71ftoc entry (at top of file)
e1aca77SR.symbol: set parent correctly (inheritance)
9ac89aeMove pynac_symbol_registry to cdef attribute SR.symbols
e06f8aeMerge branch 'u/jdemeyer/symbolic/sub-var' of trac.sagemath.org:sage into asy/singularity-analysis
f2573a9calculate coefficients of singularity analysis (pole type)
b2e375fgenerator SingularityAnalysis (pole type)
3214c83explicitly specify a default default-precision

comment:3 Changed 4 years ago by git

  • Commit changed from 3214c83c3a91f0eea73ad0068473661b1c228bfc to 8ec2dfd1c61a30960d80cba160d46a93014cdad5

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

8ec2dfdfix docstring

comment:4 Changed 4 years ago by cheuberg

  • Branch changed from u/dkrenn/asy/singularity-analysis to u/cheuberg/asy/singularity-analysis

comment:5 Changed 4 years ago by git

  • Commit changed from 8ec2dfd1c61a30960d80cba160d46a93014cdad5 to ab1cd26496a64408e8701bfe306ee6ee399e2d76

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

8f7195fTrac #19576: parentheses around coefficients of asymptotic expansions
ab1cd26Trac #19532: Merge #19576 to fix doctest

comment:6 Changed 4 years ago by git

  • Commit changed from ab1cd26496a64408e8701bfe306ee6ee399e2d76 to 9796508e6aac3883a8175a19294456685ba37c64

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

9796508Trac #19532: fix doctest

comment:7 Changed 4 years ago by cheuberg

  • Milestone changed from sage-6.10 to sage-7.1

My impression is that you implemented poles and still want to implement logarithmic singularities in the same ticket. I'd suggest to restrict this ticket to poles (and raising NotImplementedError for the logarithmic singularities, as apparently done in the current code) and to leave extensions to future tickets.

comment:8 Changed 4 years ago by cheuberg

  • Dependencies changed from #19437, #19510 to #19437, #19510, #19576

comment:9 Changed 4 years ago by dkrenn

  • Status changed from new to needs_review

comment:10 Changed 4 years ago by git

  • Commit changed from 9796508e6aac3883a8175a19294456685ba37c64 to a3a6dfd1d57038d14ee453d37884da19ad6d59cd

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

f114f9eTrac #19532: Add to table of contents
ede5173Trac #19532: Minor documentation fixes
267718dTrac #19532: Additional tests
0860173Trac #19532: List log log factors, document missing implementations
a3a6dfdTrac #19532: Add references

comment:11 follow-up: Changed 4 years ago by cheuberg

  • Description modified (diff)
  • Reviewers set to Clemens Heuberger
  • Status changed from needs_review to needs_info

I reviewed the code, doctests pass, documentation and code are mostly fine. I added a few reviewer commits, please cross-review.

There is only the question on what to do with integral alpha <= 0. Currently, the result is 0 which is certainly correct for sufficiently large values of the parameter. However, the rest of the asymptotics code as I remember it does not really assume "sufficiently large values of the parameter".

I am not really sure which result is appropriate. Several options:

  • 0 - valid for sufficiently large values of the parameter. (current version)
  • O(1) - correct, but bad for applications.
  • raise an error
  • add a warning to the documentation
  • add a note to the documentation

comment:12 Changed 4 years ago by cheuberg

zeta != 1 is not implemented.

comment:13 Changed 4 years ago by git

  • Commit changed from a3a6dfd1d57038d14ee453d37884da19ad6d59cd to 7f74b313a5e309d3c2f2c1f3a280d7ad83418c4e

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

ea3dd35small bugfix
1529a4dTrac #19510: Merge #19306 (due to #19879)
b30388bTrac #19532: Merge #19510 to fix doctest
7f74b31Trac #19532: Implement zeta != 1

comment:14 Changed 4 years ago by git

  • Commit changed from 7f74b313a5e309d3c2f2c1f3a280d7ad83418c4e to f6a233d2c5563a86ec2adb320a42f92e18d62bae

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

0c600cfadd code for singularity analysis
b8a52c6add example
e3588b6fix: .summand --> .summands
f6a233dadd precision keyword

comment:15 Changed 4 years ago by cheuberg

  • Branch changed from u/cheuberg/asy/singularity-analysis to u/cheuberg/asy/singularity-analysis-generator
  • Commit changed from f6a233d2c5563a86ec2adb320a42f92e18d62bae to 7f74b313a5e309d3c2f2c1f3a280d7ad83418c4e

pushed incorrect branch (mixup with #19944)


Last 10 new commits:

9796508Trac #19532: fix doctest
f114f9eTrac #19532: Add to table of contents
ede5173Trac #19532: Minor documentation fixes
267718dTrac #19532: Additional tests
0860173Trac #19532: List log log factors, document missing implementations
a3a6dfdTrac #19532: Add references
ea3dd35small bugfix
1529a4dTrac #19510: Merge #19306 (due to #19879)
b30388bTrac #19532: Merge #19510 to fix doctest
7f74b31Trac #19532: Implement zeta != 1

comment:16 Changed 4 years ago by git

  • Commit changed from 7f74b313a5e309d3c2f2c1f3a280d7ad83418c4e to f38cdfc7f03ff9c88d299080debd4700b9805538

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

f38cdfcTrac #19532: fix more issues with location of singularities

comment:17 in reply to: ↑ 11 Changed 4 years ago by dkrenn

Replying to cheuberg:

There is only the question on what to do with integral alpha <= 0. Currently, the result is 0 which is certainly correct for sufficiently large values of the parameter. However, the rest of the asymptotics code as I remember it does not really assume "sufficiently large values of the parameter".

I am not really sure which result is appropriate. Several options:

  • 0 - valid for sufficiently large values of the parameter. (current version)
  • O(1) - correct, but bad for applications.
  • raise an error
  • add a warning to the documentation
  • add a note to the documentation

I think the result should be O(0). Currently I am thinking about an implementation of such a term and playing around a bit. If you want to get this ticket to positive, then I would raise a NotImplementedError? at the moment. But give me a couple of days to figure out how O(0) would be possible.

Best, Daniel

comment:18 follow-up: Changed 4 years ago by cheuberg

What would O(0) mean? How would that affect #19944?

comment:19 in reply to: ↑ 18 ; follow-up: Changed 4 years ago by dkrenn

Replying to cheuberg:

What would O(0) mean?

f(n) is in O(0) if there is an N such that f(n)=0 for n >= N. Thus the coefficients of polynomials (seen as power series) would be in O(0).

How would that affect #19944?

E.g. inserting the generating function (1-z)^alpha for non-negative integers alpha would result in a O(0), but this behavior comes from this ticket here. I am not sure if #19944 would need adaptions.

comment:20 in reply to: ↑ 19 ; follow-up: Changed 4 years ago by cheuberg

Replying to dkrenn:

Replying to cheuberg:

What would O(0) mean?

f(n) is in O(0) if there is an N such that f(n)=0 for n >= N. Thus the coefficients of polynomials (seen as power series) would be in O(0).

so O(0) would be smaller than any other element in the poset and be absorbed by any other error term? Would it live in some kind of n^ZZbar with ZZbar = {- infinity} \cup ZZ?

How would that affect #19944?

E.g. inserting the generating function (1-z)^alpha for non-negative integers alpha would result in a O(0), but this behavior comes from this ticket here. I am not sure if #19944 would need adaptions.

ok, may be.

The question is whether it is worth the effort. After working on #19944 I doubt that this generator here will frequently be called outside of #19944. After all, calling #19944 with a polynomial as an argument is erroneous anyway, because polynomials do not have singularities. Thus we should never have to return O(0) so we might as well go for a warning box here and be done with the problem.

comment:21 in reply to: ↑ 20 Changed 4 years ago by dkrenn

Replying to cheuberg:

Replying to dkrenn:

f(n) is in O(0) if there is an N such that f(n)=0 for n >= N. Thus the coefficients of polynomials (seen as power series) would be in O(0).

so O(0) would be smaller than any other element in the poset and be absorbed by any other error term? Would it live in some kind of n^ZZbar with ZZbar = {- infinity} \cup ZZ?

I'm afraid, we would really need a growth of 0 to make it work correctly with cartesian products.

E.g. inserting the generating function (1-z)^alpha for non-negative integers alpha would result in a O(0), but this behavior comes from this ticket here. I am not sure if #19944 would need adaptions.

ok, may be.

The question is whether it is worth the effort. After working on #19944 I doubt that this generator here will frequently be called outside of #19944. After all, calling #19944 with a polynomial as an argument is erroneous anyway, because polynomials do not have singularities. Thus we should never have to return O(0) so we might as well go for a warning box here and be done with the problem.

I am raising a special NotImplementedError now. Code follows...

comment:22 Changed 4 years ago by dkrenn

  • Branch changed from u/cheuberg/asy/singularity-analysis-generator to u/dkrenn/asy/singularity-analysis-generator

comment:23 Changed 4 years ago by dkrenn

  • Commit changed from f38cdfc7f03ff9c88d299080debd4700b9805538 to 2dff0518eb6644590963ffe56bb6122c5c160579
  • Status changed from needs_info to needs_review

I've cross-review your changes...seem to be fine.


New commits:

2dff051raise NotImplementedOZero instead of the wrong result 0

comment:24 Changed 4 years ago by cheuberg

  • Status changed from needs_review to positive_review

LGTM. Setting to positive despite the dependency: the dependency is only in order to avoid a merge conflict (inserting new methods at the same position); so no changes are necessary here anyway independently of the fate of #19510.

comment:25 Changed 4 years ago by cheuberg

  • Branch changed from u/dkrenn/asy/singularity-analysis-generator to u/cheuberg/asy/singularity-analysis-generator

comment:26 Changed 4 years ago by cheuberg

  • Commit changed from 2dff0518eb6644590963ffe56bb6122c5c160579 to 21054cb615b46f4c857a9c247be638baf10c663b
  • Dependencies changed from #19437, #19510, #19576 to #19437, #19510, #19576, #19946
  • Status changed from positive_review to needs_review

Merged #19946 and removed work-around for #19946; please cross-review.


New commits:

1fc00c7Trac #19946: fix _pushout_ for cartesian product of growth groups
1b62954Trac #19946: add doctests to document behavior
24c153cTrac #19946: reviewer commit: ReSt error
7918417Trac #19946: additional doctest
bfb72dcTrac #19532: Merge #19946
21054cbTrac #19532: get rid of work-around for #19946

comment:27 follow-up: Changed 4 years ago by dkrenn

  • Branch changed from u/cheuberg/asy/singularity-analysis-generator to u/dkrenn/asy/singularity-analysis-generator

comment:28 in reply to: ↑ 27 Changed 4 years ago by dkrenn

  • Commit changed from 21054cb615b46f4c857a9c247be638baf10c663b to a71b84a84dee6c3ee8fb4957f5f606dec8ed96b0

I've merged in the dependency #19510 due to changes there and merge-conflicts here.


Last 10 new commits:

5d9152cTrac #19510: state constant factors/summands in Stirling and binomial
2db9105Trac #19510: separate calculation of negative powers in log_Stirling
1471336Trac #19946: rewrite and improve explaination of 1b62954
9f9a23fTrac #19961: document rpow
101e4deMerge branch 'u/dkrenn/t/19961' of trac.sagemath.org:sage into t/19946
7179c78Trac #19946: link from general doc to detailed explaination
1259201Trac #19946: fix typo
37caf25Merge branch 'u/cheuberg/t/19946' of trac.sagemath.org:sage into t/19510/asy/generators-binomial
10cd04bTrac #19510: major rewrite of binomial kn over n
a71b84aMerge remote-tracking branch 'trac/u/dkrenn/asy/generators-binomial' into t/19532/asy/singularity-analysis-generator

comment:29 Changed 4 years ago by git

  • Commit changed from a71b84a84dee6c3ee8fb4957f5f606dec8ed96b0 to 4ad4524df848ba9ddc3dace2d22b993399f6feb1

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

4c58608Trac #19898: Generator for expansion of harmonic number
adae74bTrac #19898: Merge #19510 to resolve conflicts
ef9cb08Trac #19898: Merge #19306 (due to #19879)
e193ac1Trac #19898: sage.rings.arith -> sage.arith.all (after #19879)
bedd23aTrac #19898: rename harmonic_number to HarmonicNumber
27e9e69Trac #19898: state constant summand in documentation
209329dMerge branch 'u/dkrenn/asy/generators-binomial' of trac.sagemath.org:sage into t/19898/asy/harmonic-number
4ad4524Merge branch 'u/dkrenn/asy/harmonic-number' of trac.sagemath.org:sage into t/19532/asy/singularity-analysis-generator

comment:30 Changed 4 years ago by dkrenn

  • Dependencies changed from #19437, #19510, #19576, #19946 to #19437, #19510, #19576, #19946, #19898

Merge in #19898 to avoid a merge conflict. (Git is able to merge automatically if #19898 is handled first.)

comment:31 Changed 4 years ago by cheuberg

  • Branch changed from u/dkrenn/asy/singularity-analysis-generator to u/cheuberg/asy/singularity-analysis-generator

comment:32 Changed 4 years ago by cheuberg

  • Commit changed from 4ad4524df848ba9ddc3dace2d22b993399f6feb1 to 2b95429752c5967ca69422a219a45c534e905824

Merged #19898 once more and added a doctest; please review this new doctest and then set to positive if satisfied.


Last 10 new commits:

3d51289Trac #19957: Merge #19946 to avoid work-around
b606fdfTrac #19957: remove work-around for #19946
4346994Trac #19957: rename e to expansion in doctests
5d6e9b2Trac #19957: Introduce parameter relative tolerance
00eae5dMerge branch 't/19957/asy/compare-with-values' into t/19510/asy/generators-binomial
78bdd0fTrac #19510: additional doctests using compare_with_values
148eabbTrac #19898: Merge #19510
a66c377Trac #19898: additional doctest using compare_with_values
5dc6f58Trac #19532: Merge #19898
2b95429Trac #19532: additional doctest using compare_with_values

comment:33 Changed 4 years ago by git

  • Commit changed from 2b95429752c5967ca69422a219a45c534e905824 to a4eaf8251242fe1bd2bbfd4695e126cc01edcd3f

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

a4eaf82Trac #19532: add relative tolerance to doctests introduced on this ticket

comment:34 Changed 4 years ago by dkrenn

  • Status changed from needs_review to positive_review

comment:35 Changed 4 years ago by vbraun

  • Branch changed from u/cheuberg/asy/singularity-analysis-generator to a4eaf8251242fe1bd2bbfd4695e126cc01edcd3f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.