Opened 4 years ago
Closed 4 years ago
#19083 closed enhancement (fixed)
AsymptoticRing: exp & log, cleanup, some improvements, documentation
Reported by:  dkrenn  Owned by:  

Priority:  major  Milestone:  sage6.10 
Component:  asymptotic expansions  Keywords:  
Cc:  behackl, cheuberg  Merged in:  
Authors:  Benjamin Hackl, Daniel Krenn  Reviewers:  Daniel Krenn, Clemens Heuberger 
Report Upstream:  N/A  Work issues:  
Branch:  f9fbccb (Commits)  Commit:  f9fbccb030e9a665ce76b5bd8032be852b968753 
Dependencies:  #19073  Stopgaps: 
Description (last modified by )
Logarithm and exponential function (both with arbitrary appropriate bases) of asymptotic expressions.
Cleanup, some improvements, documentation in the asymptotic ring framework (see also #17601).
Change History (96)
comment:1 Changed 4 years ago by
 Cc behackl cheuberg added
comment:2 Changed 4 years ago by
 Branch set to u/dkrenn/asy/prototype
comment:3 Changed 4 years ago by
 Commit set to e9acd0ea452a0b410fb9804e68fc6c3e7cda5233
 Dependencies set to #17600, #17693, #17715, #17716, #18182, #18223, #18586, #18587, #18930, #19017, #19028, #19047, #19048, #19068, #19073, #19079
comment:4 Changed 4 years ago by
 Commit changed from e9acd0ea452a0b410fb9804e68fc6c3e7cda5233 to 078d32730518d7eaceaecff3cf05635e60064570
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
9c1fc0e  cleanup documentation: strange 'exact removed

ddbd90a  collect asymptotic code in one directory

ae47bcb  Merge remotetracking branch 'origin/u/behackl/asy/asymptoticExpression' into t/19048/asy/an_element

3a44a01  fix imports to make doctests pass

171d232  Merge branch 'u/dkrenn/asy/an_element' of trac.sagemath.org:sage into asy/prototype

702527e  Merge commit '695f08d2dd5d98589dfc10b3f2da89ce4e7dd908' of trac.sagemath.org:sage into asy/prototype

3cacc52  change recursive pushout to common_parent (to take care of direct coercions)

4662eed  bug kind of solved (called now directly by cartesian_product); move doctest

23354db  add missing test and fix broken tests

078d327  Merge remotetracking branch 'origin/u/dkrenn/18182on6.7' into asy/prototype

comment:5 Changed 4 years ago by
 Commit changed from 078d32730518d7eaceaecff3cf05635e60064570 to 97cdf1644bb8abb579007481590b94854890fbb0
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
263598c  some doc fixes in term_moniod

a382656  add a link in growth_group_factory

c549344  some improvments in the module description of the asymptotic ring

45549cd  big_oh: some seealso

0bf9781  fix doctests

223c1e3  move parts in documentationtree

adc9236  write doc on used data structures

42a5c1e  two more headlines

d1f4611  fix docbuild (wrong apostrophe)

97cdf16  small change in division example

comment:6 Changed 4 years ago by
 Commit changed from 97cdf1644bb8abb579007481590b94854890fbb0 to 4bbe5f3177b44ca4702586e1632e0d622408df9f
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
d759c8e  allow O(0)

ab05e75  extend error messages in element_constructor and test for nonzeroness

4bb85a5  rewrite element_constructor of terms

da0a68a  term: rename base_ring to coefficient_ring

ffe1db8  make it working again and fix doctests

ff7fb30  change _repr_ of monoids

29ed6b3  move element_construction to GenericTermMonoid

1ac20d7  rewrite element_constructor of AsymptoticRing to accept SR and polynomials

15ba65e  correct a bug in growth_group_cartesian._element_constructor_

4bbe5f3  add a doctest to convert from SR

comment:7 Changed 4 years ago by
 Commit changed from 4bbe5f3177b44ca4702586e1632e0d622408df9f to 8e0428e823c5da2ae12e053c3b59331aa89d876c
comment:8 Changed 4 years ago by
 Commit changed from 8e0428e823c5da2ae12e053c3b59331aa89d876c to d59304b3d15b0824c8846fc199c7819e1621f2be
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
4115f61  add a pushoutdoctest

ad1ca3f  extend and simplify element_constructor and use convertflag everywhere

e05a7fb  categories and __classcall__

38075d0  __invert__: take care of changing parent

6d1f0c3  small changes in multiplication code

66948e2  rmul, lmul

f48f64a  doc

aad4bf7  convert NN in growth group factory doctest

b2753ed  change _an_element_: remove  to avoid infinite loop in get_action

d59304b  make AsymptoticRing derived from Algebra

comment:9 Changed 4 years ago by
 Commit changed from d59304b3d15b0824c8846fc199c7819e1621f2be to d83354486620b870e5470d19f296df63a55f6bd5
Branch pushed to git repo; I updated commit sha1. New commits:
57cd39f  doc of rmul

1e625e3  add a doctest for scalar multiplication

be23e63  fix bug with "is" and change_parameter

0c2b6e4  improves working with categories and use CommutativeAlgebras()

ee071a7  fix scalar multiplication by zero

f54e588  some checks on the given names of the generators (when using R.<....>)

92861ed  more on names/gens

18bc9e8  correct handling of parent in __invert__

d833544  minor rewrite of __pow__

comment:10 Changed 4 years ago by
 Commit changed from d83354486620b870e5470d19f296df63a55f6bd5 to e4bf13875ec50e09d3acf9f5d995c26d07d6e65a
comment:11 Changed 4 years ago by
 Commit changed from e4bf13875ec50e09d3acf9f5d995c26d07d6e65a to 7287ca1ef24fd556ff4f04f4aaf5408991573649
Branch pushed to git repo; I updated commit sha1. New commits:
a13f6cb  write map and mapped

6b747e6  mapping argument for .copy()

edfd1b8  bring map and mapped back to work and use new copyconstruction

4a33e4f  fix bug in merge

7680531  make truncate faster

c7c02b0  element.__init__: check if summands are of correct type

4659972  rewrite __init__ of element to use new feature of MutablePoset

7287ca1  make _mul_term_ faster

comment:12 Changed 4 years ago by
 Commit changed from 7287ca1ef24fd556ff4f04f4aaf5408991573649 to 6c04529928efe00371a71cb4846b8c6f527ad108
Branch pushed to git repo; I updated commit sha1. New commits:
2863321  allow merge to go over all elements

9391c78  derive MutablePoset from object (instead of SageObject)

70859d7  cleanup: delete toset since not yet implemented

d647d95  write map and mapped

e64cbd8  mapping argument for .copy()

c28749c  bring map and mapped back to work and use new copyconstruction

ceb0b37  fix bug in merge

123d0c8  Merge branch 'u/dkrenn/asy/mutableposet' into asy/prototype

6c04529  fix lazy import problem when using short representations

comment:13 Changed 4 years ago by
 Commit changed from 6c04529928efe00371a71cb4846b8c6f527ad108 to 5068df9eca37c7c1ca557fcd89376d9657814ef1
Branch pushed to git repo; I updated commit sha1. New commits:
1d023c6  import AsymptoticRing lazy

e02895f  remove some empty lines

738f4ed  explicitly use coefficient_ring(1) in subtraction

ecf5ba8  use simplify/convert everywhere explicit

55d6ad3  restructure and rewrite classcall and init of growth group

3e449df  solve nonuniquenessbug by rewriting classcall and init of term

5068df9  rewrite classcall and init of asymptotic ring

comment:14 Changed 4 years ago by
 Commit changed from 5068df9eca37c7c1ca557fcd89376d9657814ef1 to 93b8e0bd27461b3912149f7bf65232a722973294
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
25231e1  rewrite __pow__ of asymptotic ring

5408f6d  Asymptotic Term with ... > Term with ...

8730ab8  creation of element via parent method for ring

ac3d1ec  adapt __pow__

fff27da  fix FloatingPointException (vs. ZeroDivisonError)

1097dee  create misc.py and move functions from other files to this file

8bae4a9  change imports to make everything running again

184ead8  use relative imports where possible

ed536a1  use asymptotic_ring option when calling factory TermMonoid

93b8e0b  correct thing reported by pyflakes

comment:15 Changed 4 years ago by
 Commit changed from 93b8e0bd27461b3912149f7bf65232a722973294 to 2105de2bcd6f63d7b1a094e5b081a06265a99ced
comment:16 Changed 4 years ago by
 Branch changed from u/dkrenn/asy/prototype to u/behackl/asy/prototype
 Commit changed from 2105de2bcd6f63d7b1a094e5b081a06265a99ced to 742c0b9aa8e70fa753775dc282e6c2d4bb2e8db5
comment:17 Changed 4 years ago by
 Commit changed from 742c0b9aa8e70fa753775dc282e6c2d4bb2e8db5 to db2e98ad0f856a1bf473a528a9aaa7687aa2f679
comment:18 Changed 4 years ago by
 Dependencies changed from #17600, #17693, #17715, #17716, #18182, #18223, #18586, #18587, #18930, #19017, #19028, #19047, #19048, #19068, #19073, #19079 to #17600, #17693, #17715, #17716, #18182, #18223, #18586, #18587, #18930, #19017, #19028, #19047, #19048, #19068, #19073, #19079, #19094
comment:19 Changed 4 years ago by
 Branch changed from u/behackl/asy/prototype to u/dkrenn/asy/prototype
comment:20 Changed 4 years ago by
 Commit changed from db2e98ad0f856a1bf473a528a9aaa7687aa2f679 to bc1aba62f866588d7cb5a6d83d6b1c3f2ebe386b
comment:21 Changed 4 years ago by
 Commit changed from bc1aba62f866588d7cb5a6d83d6b1c3f2ebe386b to b5cc3bd8fb9bf6d6e0ec126fa841d016fe83637e
Branch pushed to git repo; I updated commit sha1. New commits:
b5cc3bd  begin examples log, exp

comment:22 Changed 4 years ago by
 Commit changed from b5cc3bd8fb9bf6d6e0ec126fa841d016fe83637e to 00cd9b4f2992b174b5092be407d40ef32c7e9ae8
Branch pushed to git repo; I updated commit sha1. New commits:
00cd9b4  update authors and acknowledgement

comment:23 Changed 4 years ago by
 Commit changed from 00cd9b4f2992b174b5092be407d40ef32c7e9ae8 to 54f17e294b497fb20e606502f9f107f7bcf7cb24
Branch pushed to git repo; I updated commit sha1. New commits:
54f17e2  == 0, == 1 > .is_zero(), .is_one()

comment:24 Changed 4 years ago by
 Commit changed from 54f17e294b497fb20e606502f9f107f7bcf7cb24 to 6377bb77b8708a93d82991cc58765c6ee43c0ec1
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
afb2e55  rename _construct_exp_ to rpow; rewrite docstrings; remove default argument for base

0637ba0  fix doctests

1d8fe49  rewrite rpow of exact term to take care of parent changes

f774223  generalize log_factor

3e07d1e  minor change on docstring of is_little_o_of_one

f7140be  cartesian_product of growth groups: create_element_via_parent

16bd200  create_element_via_parent: use categories as well

e29d13e  rpow, precision, docs

58026e4  create invert = __invert__

6377bb7  minor rewrite of AR.rpow

comment:25 Changed 4 years ago by
 Commit changed from 6377bb77b8708a93d82991cc58765c6ee43c0ec1 to aa3330be8897e25acad09dbe15230a687a50f0a8
comment:26 Changed 4 years ago by
 Branch changed from u/dkrenn/asy/prototype to u/behackl/asy/prototype
 Commit changed from aa3330be8897e25acad09dbe15230a687a50f0a8 to df8691028f6bece4cd0004b5f2b2648161cbf85b
comment:27 Changed 4 years ago by
 Commit changed from df8691028f6bece4cd0004b5f2b2648161cbf85b to cc8bf18a4feea1cfab4f42f30fc31415b1485836
Branch pushed to git repo; I updated commit sha1. New commits:
cc8bf18  fix broken links in documentation

comment:28 Changed 4 years ago by
 Branch changed from u/behackl/asy/prototype to u/dkrenn/asy/prototype
comment:29 Changed 4 years ago by
 Commit changed from cc8bf18a4feea1cfab4f42f30fc31415b1485836 to 9f881b08e7135ce9379a1a99463dd016dd401ee6
Branch pushed to git repo; I updated commit sha1. New commits:
43d30ce  extend split_str_by_op

dcd342b  adapt code; improve error messages

5a6c609  ignore variables in Variable class

6d27513  move code is_lt_one

e4f26bc  ignore_variables in growth groups

ff1c29f  adapt growth group factory (ignore_variables)

4cc405c  write repr_op function

97cb437  extend log/exp to recognise variables e^x and exp(x)

9f881b0  adapt repr of %s^%s and fix doctests

comment:30 Changed 4 years ago by
 Commit changed from 9f881b08e7135ce9379a1a99463dd016dd401ee6 to 54f2386f8d6c14331fa57c509ba81e5bb00dfa97
Branch pushed to git repo; I updated commit sha1. New commits:
1c7a0f1  small correction in all.py

5aa2a71  update copyright

03b99ce  extend change_parameter to accept strings for growth groups

f546187  extend module doc

0e8f05e  Variable: fix double variable bug

9bccac1  rename: asymptotic expression > asymptotic expansion

54f2386  rewrite moduledoc: definition

comment:31 Changed 4 years ago by
 Commit changed from 54f2386f8d6c14331fa57c509ba81e5bb00dfa97 to 2eeb13ef8eee96666dedf37606124f92a986cb86
Branch pushed to git repo; I updated commit sha1. New commits:
40a10db  raise ZeroDivisionError when QQ(0) is taken to a negative power

81c998d  add a doctest for QQ(0)^(1)

e2ba028  _self.value instead of x.value

dd55f52  move comparison before sig_on()

b027f11  rational division > Rational division

1648aae  more rational div.. > Rational div..

c04d8fb  ZeroDivisionError: Rational.. > rational..

c84284b  Merge branch 'u/behackl/arithmetic/QQinversion6.7' into asy/prototype

2eeb13e  doctests after merge of #19110

comment:32 Changed 4 years ago by
 Dependencies changed from #17600, #17693, #17715, #17716, #18182, #18223, #18586, #18587, #18930, #19017, #19028, #19047, #19048, #19068, #19073, #19079, #19094 to #17600, #17693, #17715, #17716, #18182, #18223, #18586, #18587, #18930, #19017, #19028, #19047, #19048, #19068, #19073, #19079, #19094, #19110
comment:33 Changed 4 years ago by
 Commit changed from 2eeb13ef8eee96666dedf37606124f92a986cb86 to dd4aac160d3dc689f92c0dec174b3aea1ea745ee
Branch pushed to git repo; I updated commit sha1. New commits:
d47f79f  allow op=None in split_str_by_op

5e41a11  fix element constructor of cartesian product

c5972f2  fix a bug in creation of exponential factors during rpow

2aaba81  more doctests on creating GrowthGroups

dd4aac1  extend init of Variable to strip of parentheses

comment:34 Changed 4 years ago by
 Commit changed from dd4aac160d3dc689f92c0dec174b3aea1ea745ee to 3c2fa0ca0749ddae121692e1556e6adef684e0f7
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
ca5da4a  Merge branch 't/18930/asy/growthGroupfactory' into t/18587/asy/growthgroupcartesian

ac80aeb  add growth_group_cartesian to index

96f7101  Merge branch 't/18587/asy/growthgroupcartesian' into t/19028/asy/growthGroupexponential

963f9da  Merge branch 't/19028/asy/growthGroupexponential' into t/19073/asy/groupscoercion

60d2edf  Merge branch 't/19073/asy/groupscoercion' into t/19094/asy/ringexplog

47894c8  Merge branch 't/19094/asy/ringexplog' into t/19083/asy/prototype

8894fce  Merge branch 't/17716/asy/asymptoticExpression' into t/19068/asy/inversion

106eacd  Merge branch 't/19068/asy/inversion' into t/19083/asy/prototype

1108cfc  Merge branch 't/17716/asy/asymptoticExpression' into t/19048/asy/an_element

3c2fa0c  Merge branch 't/19048/asy/an_element' into t/19083/asy/prototype

comment:36 Changed 4 years ago by
 Commit changed from 3c2fa0ca0749ddae121692e1556e6adef684e0f7 to 14f9a9a4e74b0826ced00de326e0b043bfb7b146
comment:37 Changed 4 years ago by
 Commit changed from 14f9a9a4e74b0826ced00de326e0b043bfb7b146 to 70abf65739587016ed71a953585ff56af33e325b
comment:38 Changed 4 years ago by
 Component changed from symbolics to asymptotic expansions
comment:39 Changed 4 years ago by
 Commit changed from 70abf65739587016ed71a953585ff56af33e325b to 2e4a415d7859d3968f612932b36c98318e1823d2
Branch pushed to git repo; I updated commit sha1. New commits:
2e4a415  rename title

comment:40 Changed 4 years ago by
 Commit changed from 2e4a415d7859d3968f612932b36c98318e1823d2 to b0e228b4870e49cfdc9594c5f85173bb889f6722
Branch pushed to git repo; I updated commit sha1. New commits:
cd17673  Merge tag '6.9.beta6' into t/18182/18182on6.8

3eefe25  correct typo in AUTHORS

5fe52e4  fix doctests since name of cartesian product functor has changed

60b9375  revert changes in base_ring of category_object and adapt doctests

8d6de43  Merge remotetracking branch 'trac/u/dkrenn/18182/pushout' into t/19073/asy/groupscoercion

d50cc55  Merge branch 't/19073/asy/groupscoercion' into t/19094/asy/ringexplog

44fbccc  Merge remotetracking branch 'origin/u/dkrenn/asy/ringexplog' into t/19094/asy/ringexplog

09032ee  Merge branch 't/19094/asy/ringexplog' into t/19083/asy/prototype

b0e228b  Merge remotetracking branch 'origin/u/dkrenn/asy/prototype' into t/19083/asy/prototype

comment:41 Changed 4 years ago by
merged 6.9.beta6 (with #18182)
New commits:
cd17673  Merge tag '6.9.beta6' into t/18182/18182on6.8

3eefe25  correct typo in AUTHORS

5fe52e4  fix doctests since name of cartesian product functor has changed

60b9375  revert changes in base_ring of category_object and adapt doctests

8d6de43  Merge remotetracking branch 'trac/u/dkrenn/18182/pushout' into t/19073/asy/groupscoercion

d50cc55  Merge branch 't/19073/asy/groupscoercion' into t/19094/asy/ringexplog

44fbccc  Merge remotetracking branch 'origin/u/dkrenn/asy/ringexplog' into t/19094/asy/ringexplog

09032ee  Merge branch 't/19094/asy/ringexplog' into t/19083/asy/prototype

b0e228b  Merge remotetracking branch 'origin/u/dkrenn/asy/prototype' into t/19083/asy/prototype

comment:42 Changed 4 years ago by
 Commit changed from b0e228b4870e49cfdc9594c5f85173bb889f6722 to 1109ce002874d776617102f2ccc295b410e4a3b6
comment:43 Changed 4 years ago by
 Commit changed from 1109ce002874d776617102f2ccc295b410e4a3b6 to 3ca2e9179d3bf8ad5a72df9b9b7a69cf25a0adb0
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
6d3e4f4  Trac #18587: nicer output of one link target

66759bb  Revert "remove unreachable ValueError (comment 2)"

0642564  doctest added

7f209ea  improved error message (equal or disjoint var.)

c49740a  Merge branch 'u/behackl/asy/growthgroupcartesian' of trac.sagemath.org:sage into t/19094/asy/ringexplog

4fe08b7  rewrite a doctest to make it work (and mark original test as 'not tested')

4acd110  Merge branch 'u/dkrenn/asy/ringexplog' of trac.sagemath.org:sage into t/19083/asy/prototype

45d0c03  postmerge: fix imports

f62f7cf  postmerge: fix doctests

3ca2e91  fix broken links

comment:44 Changed 4 years ago by
 Commit changed from 3ca2e9179d3bf8ad5a72df9b9b7a69cf25a0adb0 to 7f4272375d6de89bbe7fe5457c11d9165d4622ff
comment:45 Changed 4 years ago by
 Commit changed from 7f4272375d6de89bbe7fe5457c11d9165d4622ff to ff90d7351b6d8c96c7ee077dcc6d0fd7e7cf98df
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
65ce848  Merge branch 'asy/growthgroupcartesian' into asy/growthGroupexponential and resolve merge conflicts

bd93e37  fix doctests

7ec7e7d  fix indentation of one block

e56459a  : > ::

0d469cd  Merge branch 'u/behackl/asy/growthGroupexponential' of trac.sagemath.org:sage into t/19073/asy/groupscoercion

e86db32  Merge branch 'u/dkrenn/asy/asymptoticExpression' of trac.sagemath.org:sage into t/19073/asy/groupscoercion

36e16a3  fix doctests after merge

dd82094  fix duplicated docstringparts

ae300ad  Merge branch 't/19073/asy/groupscoercion' into t/19094/asy/ringexplog

ff90d73  Merge branch 't/19094/asy/ringexplog' into t/19083/asy/prototype

comment:46 Changed 4 years ago by
 Commit changed from ff90d7351b6d8c96c7ee077dcc6d0fd7e7cf98df to c4cd7ed152db8651e0af80951dfe45ed598e4399
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
e8460b9  improve docstring

9e41be5  doctest with infinite iterator inputs

97cb59c  add seealso blocks

17229c6  extend AUTHROS

e33703b  Merge branch 'u/dkrenn/product_cantor_pairing' of trac.sagemath.org:sage into t/19048/asy/an_element

a529d4c  Merge branch 'u/dkrenn/asy/an_element' of trac.sagemath.org:sage into t/19094/asy/ringexplog

ba99790  use new product_cantor_pairing and delete old product_diagonal

4a9d3d2  Merge branch 'u/dkrenn/asy/an_element' of trac.sagemath.org:sage into t/19094/asy/ringexplog

8204cfa  remove old product_diagonal (superseded by #19319)

c4cd7ed  Merge branch 't/19094/asy/ringexplog' into t/19083/asy/prototype

comment:47 Changed 4 years ago by
 Commit changed from c4cd7ed152db8651e0af80951dfe45ed598e4399 to 14941885df88ebdb20555268f193367e741fddb3
Branch pushed to git repo; I updated commit sha1. New commits:
88f0013  adapt Trac #19073, comment 20, 1: add missing INPUT/OUTPUT block of combine_exceptions

6659cee  adapt Trac #19073, comment 20, 4: missing INPUT/OUTPUT block of merge_overlapping and extend description

2008f6b  adapt Trac #19073, comment 20, 4: cache keys

1494188  adapt Trac #19073, comment 20, 7: remove Poset category from AsymptoticRing

comment:48 Changed 4 years ago by
Merged dependencies.
comment:49 Changed 4 years ago by
 Dependencies changed from #17600, #17693, #17715, #17716, #18182, #18223, #18586, #18587, #18930, #19017, #19028, #19047, #19048, #19068, #19073, #19079, #19094, #19110 to #19094
comment:50 Changed 4 years ago by
 Commit changed from 14941885df88ebdb20555268f193367e741fddb3 to 60b93ab17ef80750fbd053c2219d9bd84fe22bc9
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
4a52a84  Trac 19319: fix doctests

3c5af3b  Trac #19319: fix typo

c20bfe5  Trac #19319: a.next() > next(a) (Python3 compliance)

1fee722  Trac #19319: added a few blanks

96c0366  Trac 19319: return tuples + repeat argument

ceb1db5  Trac #19048: Merge #19319

3fd53d6  Trac #19048: rename product_cantor_pairing to cantor_product (see #19319)

617c593  Trac #19048: Fix doctests (order in cantor_product changed)

9213baa  Merge branch 'u/cheuberg/asy/an_element' of trac.sagemath.org:sage into t/19094/asy/ringexplog

60b93ab  Merge branch 'u/dkrenn/asy/ringexplog' of trac.sagemath.org:sage into t/19083/asy/prototype

comment:51 Changed 4 years ago by
 Work issues set to move code to sage.asymptotic (shortly before positive_review)
comment:52 Changed 4 years ago by
 Commit changed from 60b93ab17ef80750fbd053c2219d9bd84fe22bc9 to 2cba56bd14842af761cd4eb7eb1fb56a50424724
comment:53 followup: ↓ 55 Changed 4 years ago by
 Work issues changed from move code to sage.asymptotic (shortly before positive_review) to correct categories of growth groups; move code to sage.asymptotic (shortly before positive_review)
TODO: correct categories of MonomialGrowthGroup and ExponentialGrowthGroup; make this category consider the input (coefficients).
This comes from See http://trac.sagemath.org/ticket/19073#comment:28 of #19073.
comment:54 Changed 4 years ago by
 Commit changed from 2cba56bd14842af761cd4eb7eb1fb56a50424724 to a39204c67440a804066b1877937cccdca7593e92
Branch pushed to git repo; I updated commit sha1. New commits:
2a80346  Trac #19073: simplify signatures of helper functions in merge_overlapping

1583ffc  Trac #19073: Reword and add doctest for _pushout_

8a32f1f  correct PEP8spacings in doctest

05862f4  Merge branch 't/19073/asy/groupscoercion' into t/19094/asy/ringexplog

b160261  forgotten changes of last merge

d0c0f15  Merge branch 't/19094/asy/ringexplog' into t/19083/asy/prototype

a39204c  changes part 2 (of 2) after comments of cheuberg

comment:55 in reply to: ↑ 53 Changed 4 years ago by
 Work issues changed from correct categories of growth groups; move code to sage.asymptotic (shortly before positive_review) to move code to sage.asymptotic (shortly before positive_review)
Replying to dkrenn:
TODO: correct categories of MonomialGrowthGroup and ExponentialGrowthGroup; make this category consider the input (coefficients).
This comes from See http://trac.sagemath.org/ticket/19073#comment:28 of #19073.
This is now #19399.
comment:56 Changed 4 years ago by
 Status changed from new to needs_review
 Work issues move code to sage.asymptotic (shortly before positive_review) deleted
Work Issues: move code to sage.asymptotic (shortly before positive_review) > this is now #19400.
comment:57 Changed 4 years ago by
 Branch changed from u/dkrenn/asy/prototype to u/behackl/asy/prototype
 Commit changed from a39204c67440a804066b1877937cccdca7593e92 to b7a015029247371f719c2131bbf52c38088f15c6
comment:58 Changed 4 years ago by
 Branch changed from u/behackl/asy/prototype to u/cheuberg/asy/prototype
comment:59 Changed 4 years ago by
 Commit changed from b7a015029247371f719c2131bbf52c38088f15c6 to ccf7dcad7f22efb681be2fb49bc8921a30e1de34
Branch pushed to git repo; I updated commit sha1. New commits:
925cf15  Trac #19083: Keep longer versions of previous versions

c9ff643  Trac #19083: Adapt description to generalized function

d4df04d  Trac #19083: Add/remove missing/superfluous "TESTS::" and "EXAMPLES::"

e7f7708  Trac #19083: minor language issues

b997a0e  Trac #19083: incomplete formatting

e7ffdf3  Trac #19083: additional doctests

ccf7dca  Trac #19083: additional link

comment:60 followup: ↓ 73 Changed 4 years ago by
 Milestone changed from sage6.9 to sage6.10
 Reviewers set to Clemens Heuberger
Due to many interdependencies, I review this ticket and its dependency #19094 in one go. I pushed some reviewer commits here and add my comments here. The aim is to eventually set both tickets to positive_review
at the same time.
Up to now, I reviewed the following files:
src/doc/en/reference/rings/asymptotic_expansions_index.rst  50 +++

src/sage/data_structures/mutable_poset.py  3 +

src/sage/rings/all.py  2 +

src/sage/rings/asymptotic/all.py  3 +

src/sage/rings/asymptotic/growth_group.py  1779 +++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++ 

src/sage/rings/asymptotic/misc.py  476 ++++++++++++++++++++++++++++++++++++

Here are my comments on these files:
misc.split_str_by_op
: parameter
op
: is special treatment of^^
worthwhile whenop ='^'
or is that a special case for*
?  parameter
strip_parentheses
not tested  document and test
op is None
. This is used ingrowth_group.Variable.__init__
 parameter
misc.repr_op
: what about
and/
? Why don't they also induce parentheses?sage: from sage.rings.asymptotic.misc import repr_op sage: repr_op('ab', '^', 'c') 'ab^c' sage: repr_op('a+b', '^', 'c') '(a+b)^c'
growth_group.is_lt_one
: this is a module level function, but doctests use it as a method. mark doctest as indirect
 document this fact.
growth_group.log
: see comments on
growth_group.is_lt_one
.  error "results in a sum" is not tested.
 see comments on
growth_group.log_factor
: why
from growth_group import GenericGrowthGroup
?  see comments on
growth_group.is_lt_one
 why
GenericGrowthElement.__ne__
: is the "Note" box actually needed?GenericGrowthElement._rpow_element_
: when is the output
None
?  I do not understand "it lives (in contrast to rpow) in its own group".
 when is the output
GenericGrowthGroup._create_element_via_parent_
: I do not understand the explanation. Is "via" a good part of the name of the method?GenericGrowthGroup.gens
: why "monomial" growth group in the generic group?
 why
MonomialGrowthElement
?
MonomialGrowthElement.__pow__
: Is the following intentional:sage: P = GrowthGroup('x^ZZ') sage: x = P.gen() sage: a = x^7; a x^7 sage: a^(1/7) x sage: (a^(1/7)).parent() Growth Group x^QQ
I understand that
((1/7)*7).parent()
is
MonomialGrowthElement._log_factor_
: The parameter
base
is ignored in the secondif
:sage: G = GrowthGroup('exp(x)^ZZ*x^ZZ') sage: e1 = G('exp(x)'); e1 exp(x) sage: log(e1, base=2) x
 In some cases, computation fails although it would be feasible:
sage: G = GrowthGroup('(e^x)^ZZ*x^ZZ') sage: e1 = G('e^x'); e1 e^x sage: var('e') sage: log(e1^2, base=e^2) Traceback (most recent call last): ... ArithmeticError: Cannot build log((e^x)^2) since log(e^x) is not in Growth Group (e^x)^ZZ * x^ZZ.
 The parameter
MonomialGrowthElement._rpow_element_
: I do not understand "it lives (in contrast to rpow()) in its own group."
 Parameter
base
is not tested (with an actual result).  The documentation does not explain why
2^x
is illegal here (it seems that this method operates only if the result can be a monomial growth group element, not necessarily in the same growth group asself
).
ExponentialGrowthElement._repr_
: what is the motivation behind checking for/^
? This leads to the following (perhaps stupid) example:sage: from sage.rings.asymptotic.growth_group import ExponentialGrowthGroup sage: G = ExponentialGrowthGroup(ZZ['x'], 'y'); G Growth Group ZZ[x]^y sage: G('(1x)^y') (x + 1)^y sage: G('(1+x)^y') x + 1^y
GrowthGroupFactory
: the documentation sounds likeignore_variables=('e',)
would only be set when no keywords are given. However, this applies even if onlyignore_variables
is not set.
comment:61 Changed 4 years ago by
 Commit changed from ccf7dcad7f22efb681be2fb49bc8921a30e1de34 to a047f66131002494e5c7d42c1363122f50b769bb
comment:62 Changed 4 years ago by
Here are my comments on src/sage/rings/asymptotic/growth_group_cartesian.py
:
GenericProduct._create_element_via_parent_
: see comment 8.
 Error "Cannot create ... as a cartesian product like ..." not tested.
GenericProduct.Element.__pow__
: "This can be anything that is a valid right hand side of*
with elements of the parent's base." seems to be misplaced (each factor does have a base, and this only applies to monomial factors).GenericProduct.Element.__rpow__
: see comment 7.GenericProduct.Element._rpow_element_
: I think that the loopfor factor in factors
combined withcontinue
makes this more difficult to read than simply sayingfactor = factors[0]
because the length offactors
is1
anyway.
comment:63 Changed 4 years ago by
 Commit changed from a047f66131002494e5c7d42c1363122f50b769bb to c5dadf7a1bb3bb7785a49cb4ffd6cadc279a9084
Branch pushed to git repo; I updated commit sha1. New commits:
532b56f  Trac #19083: Minor language adjustments

bb5c08b  Trac #19083: Make doctest more explicit by showing intermediate output

7204167  Trac #19083: Remove unused part of a doctest

47d7653  Trac #19083: Add missing "EXAMPLES::"

c5dadf7  Trac #19083: More interesting doctest by including a coefficient

comment:64 followup: ↓ 79 Changed 4 years ago by
Here are my commits and comments on src/sage/rings/asymptotic/term_monoid.py
:
 Why does a
TermMonoid
withO
need a coefficient ring? GenericTerm._calculate_pow_test_zero_
: Is it possible to replace the error message "Cannot take Generic Term with growth z to exponent 2" by something which is not dependent on the very special interpretation of this very special method?GenericTerm.log_term
: remove first note box, as it is aNotImplementedError
anyway?GenericTermMonoid.__classcall__
: Test all errors.GenericTermMonoid._coerce_map_from_
: The code requires that the coefficient ring ofS
coerces into the coefficient ring ofself
, which is good, but it should be documented and tested.GenericTermMonoid._create_element_via_parent_
: See comment 8.GenericTermMonoid._split_growth_and_coefficient_
: I'd appreciate having more doctests here, e.g. actually having a product of growth groups, several factors of the coefficient (e.g., in the symbolic ring), testing the error message.GenericTermMonoid._get_factors_
: This does not work when the input is an element of a multivariate polynomial ring. On the other hand, this is more general phenomenon:sage: from sage.rings.asymptotic.term_monoid import TermMonoid sage: from sage.rings.asymptotic.growth_group import GrowthGroup sage: G_ZZ = GrowthGroup('y^ZZ*z^ZZ') sage: T_ZZ = TermMonoid('exact', G_ZZ, QQ) sage: R.<y, z> = ZZ[] sage: T_ZZ._get_factors_(5*y*z) (5*y*z,) sage: G_ZZ(y)*G_ZZ(z) y*z sage: G_ZZ(y*z) Traceback (most recent call last): ... ValueError: y*z is not in Growth Group y^ZZ * z^ZZ. > *previous* ValueError: y*z is not in any of the factors of Growth Group y^ZZ * z^ZZ
If this cannot be fixed easily, a new ticket should be devoted to that.
GenericTermMonoid.__pow__
: there is the implicit assumption that
0 = O(g)
for anyg
in the growth group. This is certainly a valid assumption in the classical case of a variable going to infinity in the reals or in the complex numbers. However, it is not clear to me what nonstandard asymptotics might be handeled by this module, e.g.,p
adic valuations or things like that. So perhaps this should somehow be documented.  test error message coming from
_calculate_pow_test_zero_
.
 there is the implicit assumption that
OTermMonoid._create_element_
: test errorTermWithCoefficient._calculate_pow_
: broken link to
:meth:`__pow__`
 test
ArithmeticError
 I do not like the broken semantics that the coefficient is taken to a power in
TermWithCoefficient._calculate_pow_
, but not inGenericTerm._calculate_pow_
.
 broken link to
TermMonoidFactory
: documentation should mention that
TermMonoid
is an instance ofTermMonoidFactory
.  test parameter
asymptotic_ring
 test case that
term
is aGenericTermMonoid
 documentation should mention that
comment:65 Changed 4 years ago by
 Commit changed from c5dadf7a1bb3bb7785a49cb4ffd6cadc279a9084 to 2c60570eb1755791db1a82aa3e3ab70ddbb505c0
Branch pushed to git repo; I updated commit sha1. New commits:
e2a0c6e  Trac #19083: minor language issues

ac9d4bc  Trac #19083: ReSt errors

b6ac6c1  Trac #19083: abbreviate link

b85176a  Trac #19083: break long lines

6b45b79  Trac #19083: mark one doctest as indirect

0481cda  Trac #19083: simplify doctest

5867787  Trac #19083: o(1) instead of O(1) for use of taylor series

2c60570  Trac #19083: additional doctest and explanation

comment:66 followups: ↓ 90 ↓ 92 Changed 4 years ago by
Here are my remaining comments (files src/sage/rings/asymptotic/asymptotic_ring.py
and src/sage/rings/big_oh.py
):
AsymptoticExpansion.__init__
: parameter
convert
is neither documented nor tested.  test error "Cannot include ..."
 parameter
AsymptoticExpansion._mul_term_
: I'd prefer to saysimplify = not isinstance(term, ExactTerm)
because this seems to be more robust with respect to future extensions.AsymptoticExpansion.__invert__
: test errors
 I think that there is shared code between
__invert__
,__log__
,__exp__
and powers with rational exponents. In all those cases, it is important to split into main term and renormalized remainder. The main term is then processed according to the respective method, the remainder is inserted into a converging taylor series with certain coefficients (this could be handeled by one method getting the sequence of taylor coefficients as an argument). Possibly in a followup ticket.
AsymptoticExpansion.__pow__
: why is
(y^2 + O(y))^(1/2)
not tested (add a comment?)  test error: "Cannot take ... to the negative exponent"
 test error: "Taking ... to the exponent ... not implemented"
 rational exponents could be implemented via binomial series (followup ticket?)
 why is
AsymptoticExpansion.log
: test error ("several maximal elements")
 I am not convinced that having
k
as anAsymptoticExpansion
is very efficient (let the division be inQQ
and convert later?, cf.rpow
.)
AsymptoticExpansion.rpow
: Decrease indentation of ALGORITHM block
 The algorithm given in the documentation seems to be quite obvious
 I do not like "the rest", "the remaining part": those are actually the asymptotic main parts.
 Why is the algorithm described in that much detail here and nowhere (
log
,exp
,pow
) else?  Test error "Cannot construct the power ..."
AsymptoticRing
: Add some comment on the "TESTS" section which is currently inactive.AsymptoticRing.change_parameter
: is this a good name (the method sounds like an inplace change, but usually returns a new parent instead)AsymptoticRing._create_element_via_parent_
: I do not like the name and the description of the method.
 The role of
old_parent
is not documented  In all uses of the method in this module,
old_parent
is set and is a term monoid. In the example of this method, it is an asymptotic ring.  I do not understand why
old_parent
is needed: ifterm.parent() is old_parent
, thenself.change_parameter
will probably not change the parent anyway.
AsymptoticRing._element_constructor_
: I do not understand the sentence "If set, then it is assured that the terms belong to this asymptotic ring (by converting them if needed)." Who does the converting?
 The note box seems to be outdated, as the parameter
summands
no longer exists.  test error "Not all list entries ..."
 Why
not data or data == 0
instead ofnot data
?  test error "Symbolic expression ... is not in ..."
 What happens with an OTerm in SR?
 conversion of multivariate polynomial ring is not tested.
AsymptoticRing._create_exact_summand_
: Why is this needed and not handeled by.create_summand
?AsymptoticRing.create_summand
: doctest case of interesting
data
(i.e. with coefficient and growth element).  The following is surprising:
sage: AR.<z> = AsymptoticRing('z^QQ', QQ) sage: AR.create_summand('exact', growth='z^2') z^2
I'd rather expect an error or zero than using an implicit coefficient of1
.
 doctest case of interesting
 Delete the following in
src/doc/en/reference/rings/index.rst
.. toctree:: :hidden: asymptotic_expansions_index
comment:67 Changed 4 years ago by
 Dependencies changed from #19094 to #19073
 Description modified (diff)
 Reviewers changed from Clemens Heuberger to Daniel Krenn, Clemens Heuberger
 Summary changed from AsymptoticRing: cleanup, some improvements, documentation to AsymptoticRing: exp & log, cleanup, some improvements, documentation
comment:68 Changed 4 years ago by
 Branch changed from u/cheuberg/asy/prototype to u/dkrenn/asy/prototype
comment:69 Changed 4 years ago by
 Commit changed from 2c60570eb1755791db1a82aa3e3ab70ddbb505c0 to e8ad893715b0dfc8a3907a05382b0c1cba57b818
Replying to cheuberg:
misc.split_str_by_op
:
 parameter
op
: is special treatment of^^
worthwhile whenop ='^'
or is that a special case for*
?
The motivation comes, of course, from *
and **
. Since ^^
is not one of Python's operators, it should not be interpreted as twice ^
. Thus, I think this should be as it is.
 parameter
strip_parentheses
not tested document and test
op is None
. This is used ingrowth_group.Variable.__init__
Added.
misc.repr_op
: what about
and/
? Why don't they also induce parentheses?sage: from sage.rings.asymptotic.misc import repr_op sage: repr_op('ab', '^', 'c') 'ab^c' sage: repr_op('a+b', '^', 'c') '(a+b)^c'
Now included as well.
growth_group.log
:
 see comments on
growth_group.is_lt_one
.
Done.
 error "results in a sum" is not tested.
Added.
growth_group.log_factor
:
 why
from growth_group import GenericGrowthGroup
?
Removed.
 see comments on
growth_group.is_lt_one
Done.
GenericGrowthElement.__ne__
: is the "Note" box actually needed?
Not really; deleted.
GenericGrowthElement._rpow_element_
:
 when is the output
None
?
Removed output None
.
 I do not understand "it lives (in contrast to rpow) in its own group".
Rewritten.
GenericGrowthGroup._create_element_via_parent_
: I do not understand the explanation.
Rewritten.
Is "via" a good part of the name of the method?
Renamed to _create_element_in_extension_
.
GenericGrowthGroup.gens
:
 why "monomial" growth group in the generic group?
 why
MonomialGrowthElement
?
Cut and paste problem; changed.
MonomialGrowthElement.__pow__
: Is the following intentional:sage: P = GrowthGroup('x^ZZ') sage: x = P.gen() sage: a = x^7; a x^7 sage: a^(1/7) x sage: (a^(1/7)).parent() Growth Group x^QQI understand that
((1/7)*7).parent()
is
(a^7)^(1/7)
is calculated as a^(7*(1/7))
, thus the same phenomenon as with ((1/7)*7).parent()
appears.
MonomialGrowthElement._log_factor_
:
 The parameter
base
is ignored in the secondif
:sage: G = GrowthGroup('exp(x)^ZZ*x^ZZ') sage: e1 = G('exp(x)'); e1 exp(x) sage: log(e1, base=2) x
Corrected.
}}}
 In some cases, computation fails although it would be feasible:
sage: G = GrowthGroup('(e^x)^ZZ*x^ZZ') sage: e1 = G('e^x'); e1 e^x sage: var('e') sage: log(e1^2, base=e^2) Traceback (most recent call last): ... ArithmeticError: Cannot build log((e^x)^2) since log(e^x) is not in Growth Group (e^x)^ZZ * x^ZZ.
This is now #19420.
MonomialGrowthElement._rpow_element_
:
 I do not understand "it lives (in contrast to rpow()) in its own group."
Changed.
 Parameter
base
is not tested (with an actual result).
Doctest added.
 The documentation does not explain why
2^x
is illegal here (it seems that this method operates only if the result can be a monomial growth group element, not necessarily in the same growth group asself
).
Example explained.
ExponentialGrowthElement._repr_
: what is the motivation behind checking for/^
? This leads to the following (perhaps stupid) example:sage: from sage.rings.asymptotic.growth_group import ExponentialGrowthGroup sage: G = ExponentialGrowthGroup(ZZ['x'], 'y'); G Growth Group ZZ[x]^y sage: G('(1x)^y') (x + 1)^y sage: G('(1+x)^y') x + 1^y
Seems to be code from before repr_op
and then just inserting it. Now rewritten.
GrowthGroupFactory
: the documentation sounds likeignore_variables=('e',)
would only be set when no keywords are given. However, this applies even if onlyignore_variables
is not set.
Rewritten.
Last 10 new commits:
0ca6efd  Trac #19094/#19083 comment 60, 11: correct wrong log and give log in errors a base

71802da  Trac #19094/#19083 comment 60, 8: rename to _create_element_in_extension_

e2285e7  Trac #19094/#19083 comment 60, 8: rewrite description of _create_element_in_extension_

4cb775f  Trac #19094/#19083 comment 60, 12: add doctest in _rpow_element to test parameter base

51f796c  Trac #19094/#19083 comment 60, 12: document _rpow_element 2^x

2f110db  Trac #19094/#19083 comment 60, 13: simplify ExponentialGrowthElement._repr_

4c49d02  Trac #19094/#19083 comment 60, 14: rewrite keyword arguments documentation of GrowthGroupFactory

d2cc73a  add forgotten "EXAMPLES::" line

498dbad  Trac #19094/#19083 comment 60, 15: add a doctest to GenericProduct._create_element_via_parent_

e8ad893  Trac #19094/#19083 comment 60, 16: delte misplaced statement in docstring

comment:70 Changed 4 years ago by
(here comes 3.: trac didn't like it when inserted with the other numbers together, but stand alone seems to be fine........)
Replying to cheuberg:
growth_group.is_lt_one
: this is a module level function, but doctests use it as a method.
 mark doctest as indirect
 document this fact.
Done.
comment:71 Changed 4 years ago by
Replying to cheuberg:
Here are my comments on
src/sage/rings/asymptotic/growth_group_cartesian.py
:
GenericProduct._create_element_via_parent_
:
 see comment 8.
Changed.
 Error "Cannot create ... as a cartesian product like ..." not tested.
Added a test.
GenericProduct.Element.__pow__
: "This can be anything that is a valid right hand side of*
with elements of the parent's base." seems to be misplaced (each factor does have a base, and this only applies to monomial factors).
Deleted.
GenericProduct.Element.__rpow__
: see comment 7.
Rewritten.
GenericProduct.Element._rpow_element_
: I think that the loopfor factor in factors
combined withcontinue
makes this more difficult to read than simply sayingfactor = factors[0]
because the length offactors
is1
anyway.
Rewritten.
comment:72 Changed 4 years ago by
 Commit changed from e8ad893715b0dfc8a3907a05382b0c1cba57b818 to b66497d7e1dfe12d486b0c50bef65547f28ed44f
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
c5dadf7  Trac #19083: More interesting doctest by including a coefficient

e2a0c6e  Trac #19083: minor language issues

ac9d4bc  Trac #19083: ReSt errors

b6ac6c1  Trac #19083: abbreviate link

b85176a  Trac #19083: break long lines

6b45b79  Trac #19083: mark one doctest as indirect

0481cda  Trac #19083: simplify doctest

5867787  Trac #19083: o(1) instead of O(1) for use of taylor series

2c60570  Trac #19083: additional doctest and explanation

b66497d  Merge remotetracking branch 'origin/u/cheuberg/asy/prototype' into t/19083/asy/prototype

comment:73 in reply to: ↑ 60 Changed 4 years ago by
Replying to cheuberg:
I pushed some reviewer commits here and add my comments here.
Crossreviewed. Fine.
comment:74 Changed 4 years ago by
 Branch changed from u/dkrenn/asy/prototype to u/cheuberg/asy/prototype
comment:75 Changed 4 years ago by
 Commit changed from b66497d7e1dfe12d486b0c50bef65547f28ed44f to 51f699d5209bae5fb70201e1da0df0b0442ad40d
comment:76 followup: ↓ 78 Changed 4 years ago by
I reviewed your changes so far (misc
, growth_group
, growth_group_cartesian
) and pushed three minor commits. Once you have crossreviewed these three, these three files are fine for me.
comment:77 Changed 4 years ago by
 Branch changed from u/cheuberg/asy/prototype to u/dkrenn/asy/prototype
comment:78 in reply to: ↑ 76 Changed 4 years ago by
 Commit changed from 51f699d5209bae5fb70201e1da0df0b0442ad40d to 3fdb4dcee28c67dd076a6552580c8ab15811924a
Replying to cheuberg:
I reviewed your changes so far (
misc
,growth_group
,growth_group_cartesian
) and pushed three minor commits. Once you have crossreviewed these three, these three files are fine for me.
Fine for me.
Last 10 new commits:
e458cd4  Trac #19094/#19083 comment 64, 25: add doctests to GenericTermMonoid._split_growth_and_coefficient_

d492447  Trac #19094/#19083 comment 64, 27: document assumption 0 = O(g)

c6fdfc0  Trac #19094/#19083 comment 64, 27: add test in __pow__ to check errors

cacd890  Trac #19094/#19083 comment 64, 28: test error in OTermMonoid._create_element_

5219671  Trac #19094/#19083 comment 64, 29: fix broken link

d4a447f  Trac #19094/#19083 comment 64, 29: TermWithCoefficient._calculate_pow_: test ArithemticError

086b62d  Trac #19094/#19083 comment 64, 30: TermMonoidFactory: note block to refer to instance TermMonoid

7647952  write docstrings for the factory instances

7e4e823  Trac #19094/#19083 comment 64, 30: more doctests in TermMonoidFactory

3fdb4dc  Merge branch 'u/cheuberg/asy/prototype' of trac.sagemath.org:sage into t/19083/asy/prototype

comment:79 in reply to: ↑ 64 Changed 4 years ago by
Replying to cheuberg:
 Why does a
TermMonoid
withO
need a coefficient ring?
To make it clear and explicit which parts of an expression are allowed to be eaten up by the OTerm. For example, having a symbolic x*y
and R = AsymptoticRing('x^ZZ', QQ), then
O(x*y) should not silently be possible in
R`.
GenericTerm._calculate_pow_test_zero_
: Is it possible to replace the error message "Cannot take Generic Term with growth z to exponent 2" by something which is not dependent on the very special interpretation of this very special method?
The method does what it claims to do. Thus I am for keeping it as it is.
GenericTerm.log_term
: remove first note box, as it is aNotImplementedError
anyway?
Removed.
GenericTermMonoid.__classcall__
: Test all errors.
Are tested now.
GenericTermMonoid._coerce_map_from_
: The code requires that the coefficient ring ofS
coerces into the coefficient ring ofself
, which is good, but it should be documented and tested.
Extended doc.
GenericTermMonoid._create_element_via_parent_
: See comment 8.
Done.
GenericTermMonoid._split_growth_and_coefficient_
: I'd appreciate having more doctests here, e.g. actually having a product of growth groups, several factors of the coefficient (e.g., in the symbolic ring), testing the error message.
Added.
GenericTermMonoid._get_factors_
: This does not work when the input is an element of a multivariate polynomial ring. [...]If this cannot be fixed easily, a new ticket should be devoted to that.
GenericTermMonoid.__pow__
:
 there is the implicit assumption that
0 = O(g)
for anyg
in the growth group. This is certainly a valid assumption in the classical case of a variable going to infinity in the reals or in the complex numbers. However, it is not clear to me what nonstandard asymptotics might be handeled by this module, e.g.,p
adic valuations or things like that. So perhaps this should somehow be documented.
I've added a note in the source code.
 test error message coming from
_calculate_pow_test_zero_
.
Test added.
OTermMonoid._create_element_
: test error
Added doctest.
TermWithCoefficient._calculate_pow_
:
 broken link to
:meth:`__pow__`
Fixed.
 test
ArithmeticError
Tested.
 I do not like the broken semantics that the coefficient is taken to a power in
TermWithCoefficient._calculate_pow_
, but not inGenericTerm._calculate_pow_
.
I've renamed coefficient
to new_coefficient
to make the difference between the methods clearer.
TermMonoidFactory
:
 documentation should mention that
TermMonoid
is an instance ofTermMonoidFactory
.
Note block added and docstring to instances added as well.
 test parameter
asymptotic_ring
Tests added.
 test case that
term
is aGenericTermMonoid
Tests added.
comment:80 Changed 4 years ago by
 Commit changed from 3fdb4dcee28c67dd076a6552580c8ab15811924a to d582c1345a788d5b8eba1b5d6e0734378f4559c4
Branch pushed to git repo; I updated commit sha1. New commits:
728ccf9  Trac #19094/#19083 comment 66, 30: document parameter convert

a7f7faf  Trac #19094/#19083 comment 66, 31: test parameter convert

7a27e68  Trac #19094/#19083 comment 66, 31: Doctest error

ad645aa  Trac #19094/#19083 comment 66, 32: change simplification check to "not exact term"

d582c13  Trac #19094/#19083 comment 66, 29: rename coefficient to new_coefficent (_calculate_pow_)

comment:81 followup: ↓ 83 Changed 4 years ago by
Finished with the terms. Needs crossreview. I will now look at the ring...
comment:82 Changed 4 years ago by
 Branch changed from u/dkrenn/asy/prototype to u/cheuberg/asy/prototype
comment:83 in reply to: ↑ 81 ; followup: ↓ 85 Changed 4 years ago by
 Commit changed from d582c1345a788d5b8eba1b5d6e0734378f4559c4 to 0042756990b86f3b0ac536fe64d14c32fb2033a0
Replying to dkrenn:
Finished with the terms. Needs crossreview.
Reviewed and added two commits. Please crossreview those. After that, only the asymptotic_ring
is still to do.
New commits:
57eb7cc  Trac #19083: Mention "GrowthGroup" in docstring of "GrowthGroupFactory"

0042756  Trac #19083: added doctest (comment 64.23)

comment:84 Changed 4 years ago by
 Branch changed from u/cheuberg/asy/prototype to u/dkrenn/asy/prototype
comment:85 in reply to: ↑ 83 Changed 4 years ago by
 Commit changed from 0042756990b86f3b0ac536fe64d14c32fb2033a0 to 44b52d61e4c1e3229ee8f3ae7c2c375a67bbc247
Replying to cheuberg:
Replying to dkrenn:
Finished with the terms. Needs crossreview.
Reviewed and added two commits. Please crossreview those.
Commits are fine.
New commits:
57eb7cc Trac #19083: Mention "GrowthGroup" in docstring of "GrowthGroupFactory"
0042756 Trac #19083: added doctest (comment 64.23)
New commits:
59db437  sort maximal elements in error string

7ca2b7f  Trac #19094/#19083 comment 66, 33: test errors in __invert__

12e8e52  Trac #19094/#19083 comment 66, 34: not tested in __pow__: refer to #19316

0845655  Trac #19094/#19083 comment 66, 34: __pow__ add error tests

3fe96bf  sort maximal elements in error string

5ca69ea  Trac #19094/#19083 comment 66, 35: doctest errors of log

cb55faa  Trac #19094/#19083 comment 66, 35: improve speed of log

d925157  Trac #19094/#19083 comment 66, 36: rpow: decrease indention of ALGORITHM block

44b52d6  Merge branch 'u/cheuberg/asy/prototype' of trac.sagemath.org:sage into t/19083/asy/prototype

comment:86 Changed 4 years ago by
Replying to cheuberg:
AsymptoticExpansion.__init__
:
 parameter
convert
is neither documented nor tested.
Now it is.
 test error "Cannot include ..."
Doctest added.
AsymptoticExpansion._mul_term_
: I'd prefer to saysimplify = not isinstance(term, ExactTerm)
because this seems to be more robust with respect to future extensions.
True, good idea; changed.
AsymptoticExpansion.__invert__
:
 test errors
Done.
comment:87 Changed 4 years ago by
AsymptoticExpansion.__invert__
:
 I think that there is shared code between
__invert__
,__log__
,__exp__
and powers with rational exponents. In all those cases, it is important to split into main term and renormalized remainder. The main term is then processed according to the respective method, the remainder is inserted into a converging taylor series with certain coefficients (this could be handeled by one method getting the sequence of taylor coefficients as an argument). Possibly in a followup ticket.
Yes, I've noticed this as well. I have it on my local todo list. Now this is #19423
comment:88 Changed 4 years ago by
AsymptoticExpansion.__pow__
:
 why is
(y^2 + O(y))^(1/2)
not tested (add a comment?)
I've refered to #19316.
 test error: "Cannot take ... to the negative exponent"
 test error: "Taking ... to the exponent ... not implemented"
Added tests.
 rational exponents could be implemented via binomial series (followup ticket?)
A ticket (#19316) already exists.
AsymptoticExpansion.log
:
 test error ("several maximal elements")
Added.
 I am not convinced that having
k
as anAsymptoticExpansion
is very efficient (let the division be inrpow
.)
Changed and made some tests: I could save about 15% cputime :)
Rest will follow later today.
comment:89 Changed 4 years ago by
 Commit changed from 44b52d61e4c1e3229ee8f3ae7c2c375a67bbc247 to 80068372f79a2e804be5c864b51bac9a1c75498a
Branch pushed to git repo; I updated commit sha1. New commits:
2522bd0  Trac #19094/#19083 comment 66, 36: add error test

8cbacdf  Trac #19094/#19083 comment 66, 37: refer to #19424 in not tested doctest

ec10395  Trac #19094/#19083 comment 66, 39: extend description of old_parent (in

36a48e4  Trac #19094/#19083 comment 66, 39: _create_element_in_extension_ rewrite doctests and rename parameter to old_term_parent

38a597b  Trac #19094/#19083 comment 66, 40: remove outdated NOTE block

b927671  Trac #19094/#19083 comment 66, 40: complete doctests of AsymptoticRing._element_constructor_

7624627  Trac #19094/#19083 comment 66, 40: refer to trac tickets at OTerm from SR todo

1ceba10  Trac #19094/#19083 comment 66, 40: test conversion from multivariate polynomial ring

8006837  Trac #19094/#19083 comment 66, 40: simplify test for empty data

comment:90 in reply to: ↑ 66 Changed 4 years ago by
Replying to cheuberg:
AsymptoticExpansion.rpow
:
 Decrease indentation of ALGORITHM block
Done.
 Test error "Cannot construct the power ..."
Added test.
AsymptoticRing
: Add some comment on the "TESTS" section which is currently inactive.
Added (#19424).
AsymptoticRing.change_parameter
: is this a good name (the method sounds like an inplace change, but usually returns a new parent instead)
True, but consistent with
sage: R.<z> = ZZ[] sage: R.change_ring(QQ) Univariate Polynomial Ring in z over Rational Field sage: R Univariate Polynomial Ring in z over Integer Ring
AsymptoticRing._create_element_via_parent_
:
 I do not like the name and the description of the method.
Changed earlier already.
 The role of
old_parent
is not documented
Extended doc.
 In all uses of the method in this module,
old_parent
is set and is a term monoid. In the example of this method, it is an asymptotic ring.
Uuups...changed.
 I do not understand why
old_parent
is needed: ifterm.parent() is old_parent
, thenself.change_parameter
will probably not change the parent anyway.
E.g. when inverting, then the term
parameter will be the already inverted term and old_parent
the parent of the original term.
AsymptoticRing._element_constructor_
:
 The note box seems to be outdated, as the parameter
summands
no longer exists.
Deleted.
 test error "Not all list entries ..."
 test error "Symbolic expression ... is not in ..."
Added.
 Why
not data or data == 0
instead ofnot data
?
Changed.
 What happens with an OTerm in SR?
There seems to be a bug in SR: #19425. Opened follow up #19426.
 conversion of multivariate polynomial ring is not tested.
Now it is.
 Delete the following in
src/doc/en/reference/rings/index.rst
.. toctree:: :hidden: asymptotic_expansions_index
Not possible, since in src/doc/en/reference/index.rst
all indices are included
via :doc:
which seems not to add them to any toctree.
comment:91 Changed 4 years ago by
 Commit changed from 80068372f79a2e804be5c864b51bac9a1c75498a to a848139a35e95bfd67d9964fa7412743942de4a4
Branch pushed to git repo; I updated commit sha1. New commits:
4e5af11  Trac #19094/#19083 comment 66, 36: delete ALGORITHM block

cb083d4  Trac #19094/#19083 comment 66, 41: delete _create_exact_summands_ since not needed

cf228bb  Trac #19094/#19083 comment 66, 42: make creating of exact summand with growth but without coefficient impossible

a848139  Trac #19094/#19083 comment 66, 42: create_summands: add doctests for interesting `data`

comment:92 in reply to: ↑ 66 Changed 4 years ago by
Replying to cheuberg:
AsymptoticExpansion.rpow
:
 The algorithm given in the documentation seems to be quite obvious
 I do not like "the rest", "the remaining part": those are actually the asymptotic main parts.
 Why is the algorithm described in that much detail here and nowhere (
log
,exp
,pow
) else?
Block deleted.
AsymptoticRing._element_constructor_
:
 I do not understand the sentence "If set, then it is assured that the terms belong to this asymptotic ring (by converting them if needed)." Who does the converting?
Meanwhile the convert parameter in AsymptoticExpansion? has a better description.
AsymptoticRing._create_exact_summand_
: Why is this needed and not handeled by.create_summand
?
Deleted and remaining code adapted.
AsymptoticRing.create_summand
:
 doctest case of interesting
data
(i.e. with coefficient and growth element).
Added.
 The following is surprising:
sage: AR.<z> = AsymptoticRing('z^QQ', QQ) sage: AR.create_summand('exact', growth='z^2') z^2I'd rather expect an error or zero than using an implicit coefficient of1
Changed; now there is an error.
comment:93 Changed 4 years ago by
 Branch changed from u/dkrenn/asy/prototype to u/cheuberg/asy/prototype
comment:94 Changed 4 years ago by
 Commit changed from a848139a35e95bfd67d9964fa7412743942de4a4 to f9fbccb030e9a665ce76b5bd8032be852b968753
comment:95 Changed 4 years ago by
 Status changed from needs_review to positive_review
I checked the changes again, added two trivial commits. Doctests pass, documentation builds, trac's automerge fails for unknown reasons, but branch merges cleanly into 6.10.beta0.
comment:96 Changed 4 years ago by
 Branch changed from u/cheuberg/asy/prototype to f9fbccb030e9a665ce76b5bd8032be852b968753
 Resolution set to fixed
 Status changed from positive_review to closed
Last 10 new commits:
construction and functor and doctests
pushout: correct str/repr (switch to be constistent with remaining Sage)
Merge branch 'pushout/functorstr' into u/dakrenn/asy/ringscoercion
fix derived classes
more replacements of __str__ by _repr_
Merge branch 'pushout/functorstr' into u/dakrenn/asy/ringscoercion
fix missing docs
improve docs (seealso, links, etc)
make doctest coverage 100% (asymptotic_ring)
cleanup (remove a comment)