Opened 6 years ago
Closed 6 years ago
#19048 closed enhancement (fixed)
AsymptoticRing: an_element
Reported by:  dkrenn  Owned by:  

Priority:  major  Milestone:  sage6.9 
Component:  asymptotic expansions  Keywords:  asymptotics 
Cc:  behackl  Merged in:  
Authors:  Daniel Krenn  Reviewers:  Benjamin Hackl, Clemens Heuberger 
Report Upstream:  N/A  Work issues:  
Branch:  617c593 (Commits, GitHub, GitLab)  Commit:  617c5933907d132785ee1052473dfa808350ec04 
Dependencies:  #17716, #19047, #19068, #19319  Stopgaps: 
Description (last modified by )
Implement .an_element
and .some_elements
.
See also metaticket #17601.
Change History (29)
comment:1 Changed 6 years ago by
 Branch set to u/dkrenn/asy/an_element
comment:2 Changed 6 years ago by
 Commit set to 4f294ce9023fc4908bb3ad67228f900111826158
comment:3 Changed 6 years ago by
 Description modified (diff)
comment:4 followup: ↓ 6 Changed 6 years ago by
 Branch changed from u/dkrenn/asy/an_element to u/behackl/asy/an_element
 Commit changed from 4f294ce9023fc4908bb3ad67228f900111826158 to 9c1fc0e5ae62f1fdfc59acea333ea9df9637e0b7
 Reviewers set to Benjamin Hackl
I've reviewed your changes, merged the latest asy/asymptoticExpression
into this branch and applied a tiny reviewer's patch (somehow, 'exact
was pasted where it definitely should not). In principal, everything looks good to me and the doctests pass.
However, do you think that asymptotic_term.py
really is the best place for the product_diagonal
function? I do understand that it is required as a helper function there  but nevertheless, from my point of view, the function is sufficiently general so that it could also live, for example, in src/sage/misc/misc.py
.
What do you think?
Last 10 new commits:
43fd06d  delete stopoption from some_elements

4f294ce  improve product_diagonal so that input is read only when needed

186ecfc  simplified doctests: removed some unneccessary imports

aa4c647  Merge branch 'u/dkrenn/asy/asymptoticExpression' into asy/asymptoticExpression

5911564  typo fixed and line break introduced

7aa3e60  `QQ` > `\mathbb{Q}`

3e2a7b3  typo fixed

f118772  some SEEALSOblocks added

9354773  Merge branch 'asy/asymptoticExpression' into asy/an_element

9c1fc0e  cleanup documentation: strange 'exact removed

comment:5 Changed 6 years ago by
 Branch changed from u/behackl/asy/an_element to u/dkrenn/asy/an_element
comment:6 in reply to: ↑ 4 Changed 6 years ago by
 Commit changed from 9c1fc0e5ae62f1fdfc59acea333ea9df9637e0b7 to 3a44a01c5f3d39c51071d57f7ae5648ba63dbba8
Replying to behackl:
I've reviewed your changes, merged the latest
asy/asymptoticExpression
into this branch and applied a tiny reviewer's patch (somehow,'exact
was pasted where it definitely should not). In principal, everything looks good to me and the doctests pass.
Thanks.
However, do you think that
asymptotic_term.py
really is the best place for theproduct_diagonal
function? I do understand that it is required as a helper function there  but nevertheless, from my point of view, the function is sufficiently general so that it could also live, for example, insrc/sage/misc/misc.py
.
I would keep it here, as it is needed (at the moment) only here.
Last 10 new commits:
6d01815  Merge branch 'asy/asymptoticTerm' into asy/asymptoticExpression

f6c4d80  doctests fixed

c7afc80  building documentation fixed

9305ca5  add . after seealsolists

50d7166  \mathbb{Q} > \QQ

2f8146d  doctests: add growth_group= and coefficient_ring= to AsymptoticRing(...) generation

6456300  minor rewording in docstring

4e7b080  Merge branch 'u/dkrenn/asy/asymptoticExpression' into asy/asymptoticExpression and fixed some merge conflicts

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

3a44a01  fix imports to make doctests pass

comment:7 Changed 6 years ago by
 Status changed from new to needs_review
comment:8 Changed 6 years ago by
 Commit changed from 3a44a01c5f3d39c51071d57f7ae5648ba63dbba8 to 1108cfc6af6cf8049e3d818270bc321c7f16ec4b
Branch pushed to git repo; I updated commit sha1. New commits:
7b8c1a0  fixed a conversion issue for terms with coefficient

83f74d3  Merge branch 'asy/asymptoticTerm' into asy/asymptoticExpression

1c81c12  language oddities fixed

032d8b8  Merge branch 'asy/growthGroup' into asy/growthGroupfactory

3a05be7  Merge tag '6.9.beta5' into t/17600/asy/growthGroup

58f931d  add asymptotic_expansions index

9d6f2da  Merge branch 't/17600/asy/growthGroup' into t/18930/asy/growthGroupfactory

6da5ade  Merge branch 't/18930/asy/growthGroupfactory' into t/17715/asy/asymptoticTerm

2c1c39d  Merge branch 't/17715/asy/asymptoticTerm' into t/17716/asy/asymptoticExpression

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

comment:9 Changed 6 years ago by
Merged 6.9.beta5
comment:10 Changed 6 years ago by
 Component changed from symbolics to asymptotic expansions
comment:11 Changed 6 years ago by
 Commit changed from 1108cfc6af6cf8049e3d818270bc321c7f16ec4b to e9ed00562a257b8fff6ae85384944c40c48f13f1
Branch pushed to git repo; I updated commit sha1. New commits:
e9ed005  fix docstring (:: instead of :)

comment:12 Changed 6 years ago by
 Branch changed from u/dkrenn/asy/an_element to u/behackl/asy/an_element
 Commit changed from e9ed00562a257b8fff6ae85384944c40c48f13f1 to 7bc65a7dbba9451510759e5575f70ac4a52e3587
Merged positively reviewed dependencies into this branch and fixed a simple conflict.
Last 10 new commits:
17e921f  remove sorted_set_by_tuple

7af4b6b  remove reverse keyword from shells

a49a20d  add comment in code to make it clear what happens

89b8209  change left/right to self/other

1d52f6c  add a note to the set operations methods

3b3b2fb  object > SageObject

572a95d  Merge branch 'asy/mutableposet' into asy/asymptoticExpression

5f54aec  explicitly forbid coercion from MutablePoset into the AsymptoticRing

4def011  Merge branch 'asy/asymptoticExpression' into asy/an_element

7bc65a7  base_ring > base_ring()

comment:13 followup: ↓ 14 Changed 6 years ago by
 Reviewers changed from Benjamin Hackl to Benjamin Hackl, Clemens Heuberger
Perhaps the name product_diagonal
could be changed to refer to the Cantor pairing function?
There is a module on multidimensional enumeration, but apparently, it only deals with finite iterators.
comment:14 in reply to: ↑ 13 Changed 6 years ago by
Replying to cheuberg:
Perhaps the name
product_diagonal
could be changed to refer to the Cantor pairing function?There is a module on multidimensional enumeration, but apparently, it only deals with finite iterators.
follow up #19319 (is now a dependency of this ticket).
comment:15 Changed 6 years ago by
 Branch changed from u/behackl/asy/an_element to u/dkrenn/asy/an_element
comment:16 Changed 6 years ago by
 Commit changed from 7bc65a7dbba9451510759e5575f70ac4a52e3587 to ba99790d116341acfd9a691ac0a2f26f705aa988
Branch pushed to git repo; I updated commit sha1. New commits:
ba99790  use new product_cantor_pairing and delete old product_diagonal

comment:17 Changed 6 years ago by
 Dependencies changed from #17716, #19047 to #17716, #19047, #19319
comment:18 Changed 6 years ago by
 Status changed from needs_review to needs_work
Doctests pass on 6.9.beta5
. On 6.9.rc0
, they do not (cf. patchbot). After merging all dependencies into 6.9.rc0
, there is still one failing doctest:
sage t src/sage/rings/asymptotic/asymptotic_ring.py ********************************************************************** File "src/sage/rings/asymptotic/asymptotic_ring.py", line 655, in sage.rings.asymptotic.asymptotic_ring.AsymptoticExpression.__pow__ Failed example: (y^2+O(y))^(2) Expected: Traceback (most recent call last): ... TypeError: unsupported operand parent(s) for '/': 'Asymptotic Ring <y^ZZ> over Integer Ring' and 'Asymptotic Ring <y^ZZ> over Integer Ring' Got: <BLANKLINE> Traceback (most recent call last): ... CoercionException: Infinite loop in action of Integer Ring (parent <type 'sage.rings.integer_ring.IntegerRing_class'>) and Asymptotic Ring <y^ZZ> over Integer Ring (parent <class 'sage.rings.asymptotic.asymptotic_ring.AsymptoticRing_with_category'>)!
comment:19 followup: ↓ 23 Changed 6 years ago by
Merging #19068 would solve the problem, but perhaps you could have a look whether there is some deeper problem before.
comment:20 Changed 6 years ago by
 Commit changed from ba99790d116341acfd9a691ac0a2f26f705aa988 to f0b1172fe8bb87a1a36ff61415cf7442ba319a30
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
abb08ff  improve _element_constructor_

78b9e96  Trac #17716: additional doctest

055e35b  Trac #17716: Fix ReSt error

e8e2501  make entry in reference/index

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

9a77311  deal with product(empty, infinite)

70185c3  remove unneccesary try/except block

d4dec2b  Trac #19319: alternative implementation

fde8e6d  minor changes to code: spacings, PEP8, remove comment

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

comment:21 Changed 6 years ago by
 Commit changed from f0b1172fe8bb87a1a36ff61415cf7442ba319a30 to f6b06c9fdd58dbfa0f655dc0d3d24d0399abb46a
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
8894fce  Merge branch 't/17716/asy/asymptoticExpression' into t/19068/asy/inversion

dc38b28  Merge branch 'asy/asymptoticExpression' into asy/inversion

59e5d38  Merge tag '6.9.rc0' into asy/inversion

f0b759a  Merge branch 'asy/asymptoticExpression' into asy/inversion

b37740f  remove code duplicate

bfc460a  fix removed keyword 'default_prec'

fc9bcf2  add result to doctest

4edaa39  slightly improve __pow__

c7023dd  todoblock with remark w.r.t. Lterms added

f6b06c9  Merge branch 'u/behackl/asy/inversion' of trac.sagemath.org:sage into t/19048/asy/an_element

comment:22 Changed 6 years ago by
 Dependencies changed from #17716, #19047, #19319 to #17716, #19047, #19068, #19319
 Status changed from needs_work to needs_review
comment:23 in reply to: ↑ 19 Changed 6 years ago by
comment:24 followup: ↓ 27 Changed 6 years ago by
 Status changed from needs_review to needs_work
#19319 now has completely new code which is guaranteed to produce merge conflicts here.
comment:25 Changed 6 years ago by
 Branch changed from u/dkrenn/asy/an_element to u/cheuberg/asy/an_element
comment:26 Changed 6 years ago by
 Commit changed from f6b06c9fdd58dbfa0f655dc0d3d24d0399abb46a to 617c5933907d132785ee1052473dfa808350ec04
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
c41435f  Revert "copy code from #19048"

c655f9f  Trac 19319: Cantor iteration of cartesian products

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)

comment:27 in reply to: ↑ 24 Changed 6 years ago by
 Status changed from needs_work to needs_review
I reviewed this code before #19319 had been factored out and did not have any objections to the part which is still in this ticket.
Replying to cheuberg:
#19319 now has completely new code which is guaranteed to produce merge conflicts here.
I now reverted all changes by the old branch of #19319, merged the new branch of #19319 and fixed code and doctests here.
Please crossreview this revert+merge+fix and set the ticket to positive_review
if you are satisfied.
comment:28 Changed 6 years ago by
 Status changed from needs_review to positive_review
Thanks for your review and the merge of the changes at #19319. I crosschecked everything; your changes look fine; documentation builds and doctests pass.
Together with your previous review, this is positive_review
.
comment:29 Changed 6 years ago by
 Branch changed from u/cheuberg/asy/an_element to 617c5933907d132785ee1052473dfa808350ec04
 Resolution set to fixed
 Status changed from positive_review to closed
Last 10 new commits:
implement QQ.some_elements()
Merge branch 'rings/QQsomeelements' into asy/an_element
improve doctests of _an_element_
some_elements for growth groups
product_diagonal iterator
improve doctest of term.an_element
some_elements for terms
_an_element_ and some_elements for asymptotic rings
delete stopoption from some_elements
improve product_diagonal so that input is read only when needed