Opened 8 months ago
Closed 7 weeks ago
#26587 closed defect (fixed)
correctly handle exponential growth in asymptotic ring
Reported by:  dkrenn  Owned by:  

Priority:  major  Milestone:  sage8.8 
Component:  asymptotic expansions  Keywords:  
Cc:  behackl  Merged in:  
Authors:  Daniel Krenn  Reviewers:  Benjamin Hackl 
Report Upstream:  N/A  Work issues:  
Branch:  22e2957 (Commits)  Commit:  22e295758f2bcf02d9f8cb42abbd9363a33ee7c2 
Dependencies:  #26588  Stopgaps: 
Description
The base of an exponential growth element can be any number, but indeed it should only be a positive number and its argument should be dealt with in a separate way (as this does not contribute to the growth, but still distinguishes different elements, e.g. (2)^n
and 2^n
. As a consequence, the sorting of the terms in an asymptotic expansion is not correct and as one wanted.
E.g. one might get something
3/32*(1)^n*n^(4) + 3/8*(1)^n*n^(5) + O((1)^n*n^(6)) + (1/27*I*sqrt(3) + 1/27)*(zeta3  1)^n*n^(3) + (1/9*I*sqrt(3) + 1/3)*(zeta3  1)^n*n^(4) + O((zeta3  1)^n*n^(5)) + 133/72*n + 7/12*log(n) + 7/12*euler_gamma  1/6*a0*(I*sqrt(3) + 1)  1/6*a1*(I*sqrt(3) + 1)  1/4*a2  23/6  11/36*n^(1) + O(n^(2)) + (1/27*I*sqrt(3) + 1/27)*zeta3^n*n^(3) + (1/9*I*sqrt(3) + 1/3)*zeta3^n*n^(4) + O(zeta3^n*n^(5))
(copied out of some larger computation)
Change History (24)
comment:1 Changed 8 months ago by
 Branch set to u/dkrenn/asyrootsofunityetc
comment:2 Changed 8 months ago by
 Commit set to ebf3d85d160e9975b4cf39559f5648b783727c3b
 Dependencies set to #26588
comment:3 Changed 8 months ago by
 Commit changed from ebf3d85d160e9975b4cf39559f5648b783727c3b to fa684a21d23de82d1139cc7acf67fbd4899e458e
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
9200823  extend docstrings and complete them

1a5fb6c  fixup conversion string to parent and fixup related doctests

1ce1501  factor out NonGrowthGroup

26eeca7  docstring of group_factory in exponential groups

da51c19  refactor group_factory

e13c97a  simplify a method

35070e2  fixup classes

4cd7643  set non_growth_group class

711c61c  extend growth group factory to deal correctly with argument growth groups

fa684a2  rename to _non_growth_group_class_

comment:4 Changed 8 months ago by
 Commit changed from fa684a21d23de82d1139cc7acf67fbd4899e458e to d1a0417095f29c62f76869f4cdd3d37c94d166df
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
d01abd4  move non_growth_groupmethods to GenericGrowthGroup

a4d2ec1  non_growth_group method for monimial groups

c2a1859  fixup doctests

67e0046  fix imports in doctest

b6ffb11  add monomial nongrowth groups

3e96f9e  solve a minor bug in repr

2e7bb26  extend growth group factory to monomial nongrowth groups

8e67f6c  add some more doctests to factory

3247905  small update in docstring

d1a0417  factory for monomial growth groups

comment:5 Changed 8 months ago by
 Commit changed from d1a0417095f29c62f76869f4cdd3d37c94d166df to ae99d04a612f3d1feac9ad48da47c975b2edcaa5
comment:6 Changed 8 months ago by
 Commit changed from ae99d04a612f3d1feac9ad48da47c975b2edcaa5 to 3804f505739d2b1dc7e9fca621c8b98cfd33891f
comment:7 Changed 8 months ago by
 Commit changed from 3804f505739d2b1dc7e9fca621c8b98cfd33891f to c3dcbe37a77fb7f811d0bb0b7e6b516bed3700fd
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
9e05089  fix inversion bug in exponential growth group

72bd4ea  whitespaces

a2d2fcf  fix and extend doctests in asymptotic_ring

d368958  helper function for stripping the symbolic part of exponents in pow

ad7a216  solve bug on pow, rpow by dealing with symbolic exponents

a563d8f  correct typo in docstring

efd6443  fix doctests after last change (pow/exponents)

3652b18  fix QQ_+ doctests on growth_group_cartesian

8f69cce  fix one more doctest in term_monoid

c3dcbe3  adapt growth group used in binomial generator

comment:8 Changed 7 months ago by
 Commit changed from c3dcbe37a77fb7f811d0bb0b7e6b516bed3700fd to 7810433064d8e857c223ac1d8997c29c47d20525
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
2466bdc  implement _an_element_ for exponential growth groups

3f0d5f6  check positivity wrt SR in __init__ of exponential growth groups

cef2e5e  fix doctests by assumptions on SR

d949a25  add an additional doctest

f0e16c4  fix doctests (U > S)

3f78197  fix doctest (U>S) for cartesian growth groups

f1b4b0f  fix doctests (U>S) for term monoids

003cf78  fix doctests asymptotic ring (U>S, assumptions SR)

6b42bc8  extend repr_op to take care of operator '_'

7810433  fix powers/rpow/cyclotomicfield conversion/coercion bug

comment:9 Changed 7 months ago by
 Cc behackl added
 Status changed from new to needs_review
comment:10 Changed 7 months ago by
 Commit changed from 7810433064d8e857c223ac1d8997c29c47d20525 to 0780a3f57544fd9af14fb783b5a4b1a718964702
Branch pushed to git repo; I updated commit sha1. New commits:
b2857e9  U: absolute value

57b4a92  Merge branch 'u/dkrenn/rootsofunitygroup' into u/dkrenn/asyrootsofunityetc

cfc8b42  _an_element_base_ for ExponentialNonGrowthGroup

182afd0  factor out additional check and skip it for ExponentialNonGrowthGroup

fdfdb1a  extend error message for additional check

0a100cc  py3correctly handle exceptions

3e7f385  py3: islice

0780a3f  Merge tag '8.5.beta2' into u/dkrenn/asyrootsofunityetc

comment:11 Changed 7 months ago by
 Commit changed from 0780a3f57544fd9af14fb783b5a4b1a718964702 to 05f08448888d7a4d0d47972239c7f5ea6160ae34
Branch pushed to git repo; I updated commit sha1. New commits:
8d05984  Trac #26146 (py3): avoid comparison of NoneType and tuple

9e1bedb  Trac #26146 (py3): fix escape in re.sub

1b73a77  Trac #26146 (py3): handle raised exceptions properly

2b124c5  Trac #26146 (py3): fix Heisenbug due to nonsorting of subsets

05f0844  Merge branch 'u/dkrenn/asypy3' of git://trac.sagemath.org/sage into u/dkrenn/asyrootsofunityetc

comment:12 Changed 7 months ago by
Some small update to take care of a trivial merge conflict in the current 8.5.beta2 and make everything Python3compatible.
comment:13 Changed 7 months ago by
 Commit changed from 05f08448888d7a4d0d47972239c7f5ea6160ae34 to 4059d0d00a1e384619a6cac48e6d3ecad31ecbcf
comment:14 Changed 7 months ago by
Ok, patchbot was not happy; changed, so let's give it another try...
New commits:
f82c1a2  Trac #26587: fix doctests other than sage.rings.asymptotic

4059d0d  Merge branch 'u/dkrenn/asyrootsofunityetc8.4' into u/dkrenn/asyrootsofunityetc

New commits:
f82c1a2  Trac #26587: fix doctests other than sage.rings.asymptotic

4059d0d  Merge branch 'u/dkrenn/asyrootsofunityetc8.4' into u/dkrenn/asyrootsofunityetc

comment:15 Changed 3 months ago by
 Commit changed from 4059d0d00a1e384619a6cac48e6d3ecad31ecbcf to a5fefd2d22e76b263e5a960ee76d888e6bf57a4d
Branch pushed to git repo; I updated commit sha1. New commits:
c994b45  Merge tag '8.7' into u/dkrenn/asyrootsofunityetc

6b50c47  Trac #26587: rename variable in doctest

01aef0f  Merge tag '8.7' into u/dkrenn/rootsofunitygroup

48523ad  extend conversion repr<>parent (cherrypick)

9aab729  remove import

a5fefd2  Merge branch 'u/dkrenn/rootsofunitygroup' into HEAD

comment:16 Changed 3 months ago by
Merged in 8.7.
comment:17 Changed 2 months ago by
 Branch changed from u/dkrenn/asyrootsofunityetc to u/behackl/asy/rootsofunityetc
 Commit changed from a5fefd2d22e76b263e5a960ee76d888e6bf57a4d to 7c1a021e1e75160bb1ec063f829669c5838eb649
 Reviewers set to Benjamin Hackl
Merged changes from #26588 and fixed one failing doctest. I'll have a look at this now.
New commits:
980825c  abs(AbstractArgument) should not return Python int

c3d5c15  additional doctests w.r.t. normalization

7c7eb1f  test that global methods real_part and imag_part also work

a193018  Merge branch 'asy/rootsofunitygroup' into asy/rootsofunityetc

7c1a021  fix failing doctest (QQ^y > (QQ_+)^y)

comment:18 Changed 2 months ago by
 Branch changed from u/behackl/asy/rootsofunityetc to u/dkrenn/asy/rootsofunityetc
comment:19 followup: ↓ 20 Changed 2 months ago by
 Commit changed from 7c1a021e1e75160bb1ec063f829669c5838eb649 to 22e295758f2bcf02d9f8cb42abbd9363a33ee7c2
These changes look good and produce a working version of the creation of the AsymptoticRing
. I only have minor remarks, namely:
growth_group.py
 L2855:
str(self.exponent).isalpha()
can probably even bestr(self.exponent).isidentifier()
.  L5348: I'd suggest trimming multiple spaces such that not only
'ZZ * I'
or'ZZ *I'
, but maybe also'ZZ * I'
and friends are recognized.
 L2855:
New commits:
8a6b4ca  Trac #26587: use isidentifier

7620a4f  Trac #26588: kwds passed on to element during construction

3d72ec3  Trac #26588: return type of __abs__

31668d6  Trac #26588: move exactly_one_is_true to sage.misc.misc

9d7173d  Trac #26588: add doctest for normalize=False

1c3e52f  Merge branch 't/26588/asy/rootsofunitygroups' into t/26587/asy/rootsofunityetc

22e2957  Trac #26587: handle multiple spaces in growth group string

comment:20 in reply to: ↑ 19 ; followup: ↓ 21 Changed 2 months ago by
Replying to behackl:
These changes look good and produce a working version of the creation of the
AsymptoticRing
. I only have minor remarks, namely:
growth_group.py
 L2855:
str(self.exponent).isalpha()
can probably even bestr(self.exponent).isidentifier()
.
Done in
8a6b4ca  Trac #26587: use isidentifier

 L5348: I'd suggest trimming multiple spaces such that not only
'ZZ * I'
or'ZZ *I'
, but maybe also'ZZ * I'
and friends are recognized.
Done in
22e2957  Trac #26587: handle multiple spaces in growth group string

comment:21 in reply to: ↑ 20 Changed 2 months ago by
 Milestone changed from sage8.5 to sage8.8
 Status changed from needs_review to positive_review
Replying to dkrenn:
growth_group.py
 L2855:
str(self.exponent).isalpha()
can probably even bestr(self.exponent).isidentifier()
.Done in
8a6b4ca Trac #26587: use isidentifier
LGTM
 L5348: I'd suggest trimming multiple spaces such that not only
'ZZ * I'
or'ZZ *I'
, but maybe also'ZZ * I'
and friends are recognized.Done in
22e2957 Trac #26587: handle multiple spaces in growth group string
LGTM.
Thank you.
comment:22 Changed 2 months ago by
 Status changed from positive_review to needs_review
... waiting for the patchbot before setting this to positive_review
.
comment:23 Changed 2 months ago by
 Status changed from needs_review to positive_review
comment:24 Changed 7 weeks ago by
 Branch changed from u/dkrenn/asy/rootsofunityetc to 22e295758f2bcf02d9f8cb42abbd9363a33ee7c2
 Resolution set to fixed
 Status changed from positive_review to closed
Last 10 new commits:
extend element constructor for partial conversion elements
update doctests due to nonnegativity
minor code simplification due to nonnegativity
extend splitting of raw elements to all complex fields
extend growth group factory
allow splitting of symbolic elements
fix remaining doctests
ExponentialArgumentGrowthGroup
...Functor
test category