Opened 4 years ago

Last modified 4 years ago

#20076 new defect

coefficients_of_generating_function fails for log-singularity with zeta != 1

Reported by: behackl Owned by:
Priority: major Milestone: sage-7.1
Component: asymptotic expansions Keywords:
Cc: dkrenn, cheuberg Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/behackl/asy/coef-generating/zeta-neq-1 (Commits) Commit: 265e9b428a6bf8e2e3a60285cf34f75e232848de
Dependencies: #20053 Stopgaps:

Description

sage: A.<n> = AsymptoticRing('QQ^n * n^QQ', QQ)
sage: def f(z):
....:     return log(1-2*z)
sage: A.coefficients_of_generating_function(f, (1/2,), precision=5)
Traceback (most recent call last):
...
TypeError: Cannot apply the substitution rules {Z: n} on -1/2*2^Z*Z^(-1) + O(2^Z*Z^(-3)) in Asymptotic Ring <(Symbolic Constants Subring)^Z * Z^(Symbolic Constants Subring) * log(Z)^(Symbolic Constants Subring)> over Symbolic Ring.
> *previous* TypeError: Cannot substitute in -1/2*2^Z*Z^(-1) + O(2^Z*Z^(-3)) in Asymptotic Ring <(Symbolic Constants Subring)^Z * Z^(Symbolic Constants Subring) * log(Z)^(Symbolic Constants Subring)> over Symbolic Ring.
>> *previous* TypeError: Cannot substitute in O(2^Z*Z^(-3)) in O-Term Monoid (Symbolic Constants Subring)^Z * Z^(Symbolic Constants Subring) * log(Z)^(Symbolic Constants Subring) with implicit coefficients in Symbolic Ring.
>>> *previous* TypeError: Cannot substitute in 2^Z*Z^(-3) in Growth Group (Symbolic Constants Subring)^Z * Z^(Symbolic Constants Subring) * log(Z)^(Symbolic Constants Subring).
>>>> *previous* TypeError: Cannot substitute in 2^Z in Growth Group (Symbolic Constants Subring)^Z.
>>>>> *previous* TypeError: no canonical coercion from Asymptotic Ring <n^QQ * QQ^n> over Rational Field to Symbolic Constants Subring

Change History (1)

comment:1 Changed 4 years ago by behackl

  • Branch set to u/behackl/asy/coef-generating/zeta-neq-1
  • Commit set to 265e9b428a6bf8e2e3a60285cf34f75e232848de
  • Dependencies set to #20053

This is just a very quick fix the behavior; the exception that might occur should be handled as well.


Last 10 new commits:

0384e25Trac #19540: use is_one()
3f0f855Trac #19540: variable_names for growth elements
eb49c65Trac #19540: variable_names for terms
5a4adf0Trac #19540: variable_names for asymptotic expansions
d9f2796Trac #19540: _factorial_ for terms
c801853Trac #19540: rewrite factorial
139f7c8Trac #19540: note on log(s).factorial()
23948e4Merge branch 'u/cheuberg/asy/singularity-analysis-method' of git://trac.sagemath.org/sage into t/19540/asy/factorial
7acc487Trac #20053: Merge branch #19540 to resolve merge conflict
265e9b4try to use rpow if the previous substitution fails
Note: See TracTickets for help on using tickets.