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: sage-6.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 cheuberg)

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 dkrenn

  • Cc behackl cheuberg added

comment:2 Changed 4 years ago by dkrenn

  • Branch set to u/dkrenn/asy/prototype

comment:3 Changed 4 years ago by dkrenn

  • Commit set to e9acd0ea452a0b410fb9804e68fc6c3e7cda5233
  • Dependencies set to #17600, #17693, #17715, #17716, #18182, #18223, #18586, #18587, #18930, #19017, #19028, #19047, #19048, #19068, #19073, #19079

Last 10 new commits:

a23d36econstruction and functor and doctests
3b49e70pushout: correct str/repr (switch to be constistent with remaining Sage)
a3b2cc6Merge branch 'pushout/functor-str' into u/dakrenn/asy/rings-coercion
19247a5fix derived classes
dacbfcbmore replacements of __str__ by _repr_
d1356e5Merge branch 'pushout/functor-str' into u/dakrenn/asy/rings-coercion
27601bafix missing docs
e1acc40improve docs (seealso, links, etc)
98e8860make doctest coverage 100% (asymptotic_ring)
e9acd0ecleanup (remove a comment)

comment:4 Changed 4 years ago by git

  • Commit changed from e9acd0ea452a0b410fb9804e68fc6c3e7cda5233 to 078d32730518d7eaceaecff3cf05635e60064570

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

9c1fc0ecleanup documentation: strange 'exact removed
ddbd90acollect asymptotic code in one directory
ae47bcbMerge remote-tracking branch 'origin/u/behackl/asy/asymptoticExpression' into t/19048/asy/an_element
3a44a01fix imports to make doctests pass
171d232Merge branch 'u/dkrenn/asy/an_element' of trac.sagemath.org:sage into asy/prototype
702527eMerge commit '695f08d2dd5d98589dfc10b3f2da89ce4e7dd908' of trac.sagemath.org:sage into asy/prototype
3cacc52change recursive pushout to common_parent (to take care of direct coercions)
4662eedbug kind of solved (called now directly by cartesian_product); move doctest
23354dbadd missing test and fix broken tests
078d327Merge remote-tracking branch 'origin/u/dkrenn/18182-on-6.7' into asy/prototype

comment:5 Changed 4 years ago by git

  • Commit changed from 078d32730518d7eaceaecff3cf05635e60064570 to 97cdf1644bb8abb579007481590b94854890fbb0

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

263598csome doc fixes in term_moniod
a382656add a link in growth_group_factory
c549344some improvments in the module description of the asymptotic ring
45549cdbig_oh: some seealso
0bf9781fix doctests
223c1e3move parts in documentation-tree
adc9236write doc on used data structures
42a5c1etwo more headlines
d1f4611fix docbuild (wrong apostrophe)
97cdf16small change in division example

comment:6 Changed 4 years ago by git

  • Commit changed from 97cdf1644bb8abb579007481590b94854890fbb0 to 4bbe5f3177b44ca4702586e1632e0d622408df9f

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

d759c8eallow O(0)
ab05e75extend error messages in element_constructor and test for nonzeroness
4bb85a5rewrite element_constructor of terms
da0a68aterm: rename base_ring to coefficient_ring
ffe1db8make it working again and fix doctests
ff7fb30change _repr_ of monoids
29ed6b3move element_construction to GenericTermMonoid
1ac20d7rewrite element_constructor of AsymptoticRing to accept SR and polynomials
15ba65ecorrect a bug in growth_group_cartesian._element_constructor_
4bbe5f3add a doctest to convert from SR

comment:7 Changed 4 years ago by git

  • Commit changed from 4bbe5f3177b44ca4702586e1632e0d622408df9f to 8e0428e823c5da2ae12e053c3b59331aa89d876c

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

c958237docs and doctests for 100%
b8ebe81' * ' to '*' in elements
8e0428eremove special treating of 1/x in _repr_ (due to inconsitency)

comment:8 Changed 4 years ago by git

  • Commit changed from 8e0428e823c5da2ae12e053c3b59331aa89d876c to d59304b3d15b0824c8846fc199c7819e1621f2be

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

4115f61add a pushout-doctest
ad1ca3fextend and simplify element_constructor and use convert-flag everywhere
e05a7fbcategories and __classcall__
38075d0__invert__: take care of changing parent
6d1f0c3small changes in multiplication code
66948e2rmul, lmul
f48f64adoc
aad4bf7convert NN in growth group factory doctest
b2753edchange _an_element_: remove - to avoid infinite loop in get_action
d59304bmake AsymptoticRing derived from Algebra

comment:9 Changed 4 years ago by git

  • Commit changed from d59304b3d15b0824c8846fc199c7819e1621f2be to d83354486620b870e5470d19f296df63a55f6bd5

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

57cd39fdoc of rmul
1e625e3add a doctest for scalar multiplication
be23e63fix bug with "is" and change_parameter
0c2b6e4improves working with categories and use CommutativeAlgebras()
ee071a7fix scalar multiplication by zero
f54e588some checks on the given names of the generators (when using R.<....>)
92861edmore on names/gens
18bc9e8correct handling of parent in __invert__
d833544minor rewrite of __pow__

comment:10 Changed 4 years ago by git

  • Commit changed from d83354486620b870e5470d19f296df63a55f6bd5 to e4bf13875ec50e09d3acf9f5d995c26d07d6e65a

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

caef9eaterm: is_same --> __eq__
5618385rewrite has_same_summands to use iterators efficiently
51cfce6adapt doc
ef4160eMerge branch 'asy/inversion' into asy/prototype
e4bf138fix failing doctest after merge

comment:11 Changed 4 years ago by git

  • Commit changed from e4bf13875ec50e09d3acf9f5d995c26d07d6e65a to 7287ca1ef24fd556ff4f04f4aaf5408991573649

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

a13f6cbwrite map and mapped
6b747e6mapping argument for .copy()
edfd1b8bring map and mapped back to work and use new copy-construction
4a33e4ffix bug in merge
7680531make truncate faster
c7c02b0element.__init__: check if summands are of correct type
4659972rewrite __init__ of element to use new feature of MutablePoset
7287ca1make _mul_term_ faster

comment:12 Changed 4 years ago by git

  • Commit changed from 7287ca1ef24fd556ff4f04f4aaf5408991573649 to 6c04529928efe00371a71cb4846b8c6f527ad108

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

2863321allow merge to go over all elements
9391c78derive MutablePoset from object (instead of SageObject)
70859d7cleanup: delete toset since not yet implemented
d647d95write map and mapped
e64cbd8mapping argument for .copy()
c28749cbring map and mapped back to work and use new copy-construction
ceb0b37fix bug in merge
123d0c8Merge branch 'u/dkrenn/asy/mutable-poset' into asy/prototype
6c04529fix lazy import problem when using short representations

comment:13 Changed 4 years ago by git

  • Commit changed from 6c04529928efe00371a71cb4846b8c6f527ad108 to 5068df9eca37c7c1ca557fcd89376d9657814ef1

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

1d023c6import AsymptoticRing lazy
e02895fremove some empty lines
738f4edexplicitly use coefficient_ring(-1) in subtraction
ecf5ba8use simplify/convert everywhere explicit
55d6ad3restructure and rewrite classcall and init of growth group
3e449dfsolve non-uniquenessbug by rewriting classcall and init of term
5068df9rewrite classcall and init of asymptotic ring

comment:14 Changed 4 years ago by git

  • Commit changed from 5068df9eca37c7c1ca557fcd89376d9657814ef1 to 93b8e0bd27461b3912149f7bf65232a722973294

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

25231e1rewrite __pow__ of asymptotic ring
5408f6dAsymptotic Term with ... --> Term with ...
8730ab8creation of element via parent method for ring
ac3d1ecadapt __pow__
fff27dafix FloatingPointException (vs. ZeroDivisonError)
1097deecreate misc.py and move functions from other files to this file
8bae4a9change imports to make everything running again
184ead8use relative imports where possible
ed536a1use asymptotic_ring option when calling factory TermMonoid
93b8e0bcorrect thing reported by pyflakes

comment:15 Changed 4 years ago by git

  • Commit changed from 93b8e0bd27461b3912149f7bf65232a722973294 to 2105de2bcd6f63d7b1a094e5b081a06265a99ced

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

6fd5a5cfix __eq__ in AsymptoticExpression
dd42bb2QQ(0)^(-1) bug; #19110
38cc817TestSuite for Ring
df29853some_elements for growth_group_cartesian
2105de2TestSuite for growth groups

comment:16 Changed 4 years ago by behackl

  • Branch changed from u/dkrenn/asy/prototype to u/behackl/asy/prototype
  • Commit changed from 2105de2bcd6f63d7b1a094e5b081a06265a99ced to 742c0b9aa8e70fa753775dc282e6c2d4bb2e8db5

New commits:

ec26132documentation in reference/asymptotic_ring
63435e3removed other references to rings/asymptotic
53c1698added footer to asymptotic_ring/index.rst
742c0b9documentation: asymptotic_ring index title adapted

comment:17 Changed 4 years ago by git

  • Commit changed from 742c0b9aa8e70fa753775dc282e6c2d4bb2e8db5 to db2e98ad0f856a1bf473a528a9aaa7687aa2f679

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

1a513efdocumentation: log --> \log (within math mode)
a5f7f9afixed broken reference
d209e20* --> \cdot (within math mode)
db2e98a: --> :: (marking doctests correctly)

comment:18 Changed 4 years ago by dkrenn

  • Authors set to Daniel Krenn
  • 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 dkrenn

  • Branch changed from u/behackl/asy/prototype to u/dkrenn/asy/prototype

comment:20 Changed 4 years ago by git

  • Commit changed from db2e98ad0f856a1bf473a528a9aaa7687aa2f679 to bc1aba62f866588d7cb5a6d83d6b1c3f2ebe386b

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

daffd54move doctree asymptotic_ring back to rings
cea9847improve doc-index of asymptotic ring
c0feeedminor mod in module description of ring
bc1aba6update links (:mod: --> :doc:)

comment:21 Changed 4 years ago by git

  • Commit changed from bc1aba62f866588d7cb5a6d83d6b1c3f2ebe386b to b5cc3bd8fb9bf6d6e0ec126fa841d016fe83637e

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

b5cc3bdbegin examples log, exp

comment:22 Changed 4 years ago by git

  • Commit changed from b5cc3bd8fb9bf6d6e0ec126fa841d016fe83637e to 00cd9b4f2992b174b5092be407d40ef32c7e9ae8

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

00cd9b4update authors and acknowledgement

comment:23 Changed 4 years ago by git

  • 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 git

  • Commit changed from 54f17e294b497fb20e606502f9f107f7bcf7cb24 to 6377bb77b8708a93d82991cc58765c6ee43c0ec1

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

afb2e55rename _construct_exp_ to rpow; rewrite docstrings; remove default argument for base
0637ba0fix doctests
1d8fe49rewrite rpow of exact term to take care of parent changes
f774223generalize log_factor
3e07d1eminor change on docstring of is_little_o_of_one
f7140becartesian_product of growth groups: create_element_via_parent
16bd200create_element_via_parent: use categories as well
e29d13erpow, precision, docs
58026e4create invert = __invert__
6377bb7minor rewrite of AR.rpow

comment:25 Changed 4 years ago by git

  • Commit changed from 6377bb77b8708a93d82991cc58765c6ee43c0ec1 to aa3330be8897e25acad09dbe15230a687a50f0a8

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

1a69577example constant e
312f5bffix a broken link
aa3330badapt doctests (SR vs. QQ['e'])

comment:26 Changed 4 years ago by behackl

  • Branch changed from u/dkrenn/asy/prototype to u/behackl/asy/prototype
  • Commit changed from aa3330be8897e25acad09dbe15230a687a50f0a8 to df8691028f6bece4cd0004b5f2b2648161cbf85b

New commits:

2addcc0ack. GSoC15
517cec2minor rewording
a04ae59remove strange comment in doctest
a804b7brefactoring doctests: agg, atm: gone. instead: from ... import ...
df86910Merge branch 'u/dkrenn/asy/prototype' of git://trac.sagemath.org/sage into asy/prototype

comment:27 Changed 4 years ago by git

  • Commit changed from df8691028f6bece4cd0004b5f2b2648161cbf85b to cc8bf18a4feea1cfab4f42f30fc31415b1485836

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

cc8bf18fix broken links in documentation

comment:28 Changed 4 years ago by dkrenn

  • Branch changed from u/behackl/asy/prototype to u/dkrenn/asy/prototype

comment:29 Changed 4 years ago by git

  • Commit changed from cc8bf18a4feea1cfab4f42f30fc31415b1485836 to 9f881b08e7135ce9379a1a99463dd016dd401ee6

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

43d30ceextend split_str_by_op
dcd342badapt code; improve error messages
5a6c609ignore variables in Variable class
6d27513move code is_lt_one
e4f26bcignore_variables in growth groups
ff1c29fadapt growth group factory (ignore_variables)
4cc405cwrite repr_op function
97cb437extend log/exp to recognise variables e^x and exp(x)
9f881b0adapt repr of %s^%s and fix doctests

comment:30 Changed 4 years ago by git

  • Commit changed from 9f881b08e7135ce9379a1a99463dd016dd401ee6 to 54f2386f8d6c14331fa57c509ba81e5bb00dfa97

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

1c7a0f1small correction in all.py
5aa2a71update copyright
03b99ceextend change_parameter to accept strings for growth groups
f546187extend module doc
0e8f05eVariable: fix double variable bug
9bccac1rename: asymptotic expression --> asymptotic expansion
54f2386rewrite module-doc: definition

comment:31 Changed 4 years ago by git

  • Commit changed from 54f2386f8d6c14331fa57c509ba81e5bb00dfa97 to 2eeb13ef8eee96666dedf37606124f92a986cb86

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

40a10dbraise ZeroDivisionError when QQ(0) is taken to a negative power
81c998dadd a doctest for QQ(0)^(-1)
e2ba028_self.value instead of x.value
dd55f52move comparison before sig_on()
b027f11rational division --> Rational division
1648aaemore rational div.. --> Rational div..
c04d8fbZeroDivisionError: Rational.. --> rational..
c84284bMerge branch 'u/behackl/arithmetic/QQ-inversion-6.7' into asy/prototype
2eeb13edoctests after merge of #19110

comment:32 Changed 4 years ago by dkrenn

  • 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 git

  • Commit changed from 2eeb13ef8eee96666dedf37606124f92a986cb86 to dd4aac160d3dc689f92c0dec174b3aea1ea745ee

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

d47f79fallow op=None in split_str_by_op
5e41a11fix element constructor of cartesian product
c5972f2fix a bug in creation of exponential factors during rpow
2aaba81more doctests on creating GrowthGroups
dd4aac1extend init of Variable to strip of parentheses

comment:34 Changed 4 years ago by git

  • Commit changed from dd4aac160d3dc689f92c0dec174b3aea1ea745ee to 3c2fa0ca0749ddae121692e1556e6adef684e0f7

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

ca5da4aMerge branch 't/18930/asy/growthGroup-factory' into t/18587/asy/growth-group-cartesian
ac80aebadd growth_group_cartesian to index
96f7101Merge branch 't/18587/asy/growth-group-cartesian' into t/19028/asy/growthGroup-exponential
963f9daMerge branch 't/19028/asy/growthGroup-exponential' into t/19073/asy/groups-coercion
60d2edfMerge branch 't/19073/asy/groups-coercion' into t/19094/asy/ring-exp-log
47894c8Merge branch 't/19094/asy/ring-exp-log' into t/19083/asy/prototype
8894fceMerge branch 't/17716/asy/asymptoticExpression' into t/19068/asy/inversion
106eacdMerge branch 't/19068/asy/inversion' into t/19083/asy/prototype
1108cfcMerge branch 't/17716/asy/asymptoticExpression' into t/19048/asy/an_element
3c2fa0cMerge branch 't/19048/asy/an_element' into t/19083/asy/prototype

comment:35 Changed 4 years ago by dkrenn

merged 6.9.beta5

Last edited 4 years ago by dkrenn (previous) (diff)

comment:36 Changed 4 years ago by git

  • Commit changed from 3c2fa0ca0749ddae121692e1556e6adef684e0f7 to 14f9a9a4e74b0826ced00de326e0b043bfb7b146

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

1812a5erename doc-index-file
0720b14fix doctests: update since TestSuite now checks for cardinality
14f9a9aMerge branch 't/19094/asy/ring-exp-log' into t/19083/asy/prototype

comment:37 Changed 4 years ago by git

  • Commit changed from 14f9a9a4e74b0826ced00de326e0b043bfb7b146 to 70abf65739587016ed71a953585ff56af33e325b

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

9aba4b6make entry in reference/index
70abf65include misc

comment:38 Changed 4 years ago by dkrenn

  • Component changed from symbolics to asymptotic expansions

comment:39 Changed 4 years ago by git

  • Commit changed from 70abf65739587016ed71a953585ff56af33e325b to 2e4a415d7859d3968f612932b36c98318e1823d2

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

2e4a415rename title

comment:40 Changed 4 years ago by git

  • Commit changed from 2e4a415d7859d3968f612932b36c98318e1823d2 to b0e228b4870e49cfdc9594c5f85173bb889f6722

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

cd17673Merge tag '6.9.beta6' into t/18182/18182-on-6.8
3eefe25correct typo in AUTHORS
5fe52e4fix doctests since name of cartesian product functor has changed
60b9375revert changes in base_ring of category_object and adapt doctests
8d6de43Merge remote-tracking branch 'trac/u/dkrenn/18182/pushout' into t/19073/asy/groups-coercion
d50cc55Merge branch 't/19073/asy/groups-coercion' into t/19094/asy/ring-exp-log
44fbcccMerge remote-tracking branch 'origin/u/dkrenn/asy/ring-exp-log' into t/19094/asy/ring-exp-log
09032eeMerge branch 't/19094/asy/ring-exp-log' into t/19083/asy/prototype
b0e228bMerge remote-tracking branch 'origin/u/dkrenn/asy/prototype' into t/19083/asy/prototype

comment:41 Changed 4 years ago by dkrenn

merged 6.9.beta6 (with #18182)


New commits:

cd17673Merge tag '6.9.beta6' into t/18182/18182-on-6.8
3eefe25correct typo in AUTHORS
5fe52e4fix doctests since name of cartesian product functor has changed
60b9375revert changes in base_ring of category_object and adapt doctests
8d6de43Merge remote-tracking branch 'trac/u/dkrenn/18182/pushout' into t/19073/asy/groups-coercion
d50cc55Merge branch 't/19073/asy/groups-coercion' into t/19094/asy/ring-exp-log
44fbcccMerge remote-tracking branch 'origin/u/dkrenn/asy/ring-exp-log' into t/19094/asy/ring-exp-log
09032eeMerge branch 't/19094/asy/ring-exp-log' into t/19083/asy/prototype
b0e228bMerge remote-tracking branch 'origin/u/dkrenn/asy/prototype' into t/19083/asy/prototype

comment:42 Changed 4 years ago by git

  • Commit changed from b0e228b4870e49cfdc9594c5f85173bb889f6722 to 1109ce002874d776617102f2ccc295b410e4a3b6

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

c16587cfix bug (tower has only one entry which is None)
1109ce0Merge branch 'u/dkrenn/18182/pushout' of trac.sagemath.org:sage into t/19083/asy/prototype

comment:43 Changed 4 years ago by git

  • Commit changed from 1109ce002874d776617102f2ccc295b410e4a3b6 to 3ca2e9179d3bf8ad5a72df9b9b7a69cf25a0adb0

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

6d3e4f4Trac #18587: nicer output of one link target
66759bbRevert "remove unreachable ValueError (comment 2)"
0642564doctest added
7f209eaimproved error message (equal or disjoint var.)
c49740aMerge branch 'u/behackl/asy/growth-group-cartesian' of trac.sagemath.org:sage into t/19094/asy/ring-exp-log
4fe08b7rewrite a doctest to make it work (and mark original test as 'not tested')
4acd110Merge branch 'u/dkrenn/asy/ring-exp-log' of trac.sagemath.org:sage into t/19083/asy/prototype
45d0c03post-merge: fix imports
f62f7cfpost-merge: fix doctests
3ca2e91fix broken links

comment:44 Changed 4 years ago by git

  • Commit changed from 3ca2e9179d3bf8ad5a72df9b9b7a69cf25a0adb0 to 7f4272375d6de89bbe7fe5457c11d9165d4622ff

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

03f3621fix duplicated docstring-parts
7f42723update AUTHORS (new style)

comment:45 Changed 4 years ago by git

  • Commit changed from 7f4272375d6de89bbe7fe5457c11d9165d4622ff to ff90d7351b6d8c96c7ee077dcc6d0fd7e7cf98df

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

65ce848Merge branch 'asy/growth-group-cartesian' into asy/growthGroup-exponential and resolve merge conflicts
bd93e37fix doctests
7ec7e7dfix indentation of one block
e56459a: --> ::
0d469cdMerge branch 'u/behackl/asy/growthGroup-exponential' of trac.sagemath.org:sage into t/19073/asy/groups-coercion
e86db32Merge branch 'u/dkrenn/asy/asymptoticExpression' of trac.sagemath.org:sage into t/19073/asy/groups-coercion
36e16a3fix doctests after merge
dd82094fix duplicated docstring-parts
ae300adMerge branch 't/19073/asy/groups-coercion' into t/19094/asy/ring-exp-log
ff90d73Merge branch 't/19094/asy/ring-exp-log' into t/19083/asy/prototype

comment:46 Changed 4 years ago by git

  • Commit changed from ff90d7351b6d8c96c7ee077dcc6d0fd7e7cf98df to c4cd7ed152db8651e0af80951dfe45ed598e4399

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

e8460b9improve docstring
9e41be5doctest with infinite iterator inputs
97cb59cadd seealso blocks
17229c6extend AUTHROS
e33703bMerge branch 'u/dkrenn/product_cantor_pairing' of trac.sagemath.org:sage into t/19048/asy/an_element
a529d4cMerge branch 'u/dkrenn/asy/an_element' of trac.sagemath.org:sage into t/19094/asy/ring-exp-log
ba99790use new product_cantor_pairing and delete old product_diagonal
4a9d3d2Merge branch 'u/dkrenn/asy/an_element' of trac.sagemath.org:sage into t/19094/asy/ring-exp-log
8204cfaremove old product_diagonal (superseded by #19319)
c4cd7edMerge branch 't/19094/asy/ring-exp-log' into t/19083/asy/prototype

comment:47 Changed 4 years ago by git

  • Commit changed from c4cd7ed152db8651e0af80951dfe45ed598e4399 to 14941885df88ebdb20555268f193367e741fddb3

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

88f0013adapt Trac #19073, comment 20, 1: add missing INPUT/OUTPUT block of combine_exceptions
6659ceeadapt Trac #19073, comment 20, 4: missing INPUT/OUTPUT block of merge_overlapping and extend description
2008f6badapt Trac #19073, comment 20, 4: cache keys
1494188adapt Trac #19073, comment 20, 7: remove Poset category from AsymptoticRing

comment:48 Changed 4 years ago by dkrenn

Merged dependencies.

comment:49 Changed 4 years ago by dkrenn

  • 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 git

  • Commit changed from 14941885df88ebdb20555268f193367e741fddb3 to 60b93ab17ef80750fbd053c2219d9bd84fe22bc9

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

4a52a84Trac 19319: fix doctests
3c5af3bTrac #19319: fix typo
c20bfe5Trac #19319: a.next() -> next(a) (Python3 compliance)
1fee722Trac #19319: added a few blanks
96c0366Trac 19319: return tuples + repeat argument
ceb1db5Trac #19048: Merge #19319
3fd53d6Trac #19048: rename product_cantor_pairing to cantor_product (see #19319)
617c593Trac #19048: Fix doctests (order in cantor_product changed)
9213baaMerge branch 'u/cheuberg/asy/an_element' of trac.sagemath.org:sage into t/19094/asy/ring-exp-log
60b93abMerge branch 'u/dkrenn/asy/ring-exp-log' of trac.sagemath.org:sage into t/19083/asy/prototype

comment:51 Changed 4 years ago by dkrenn

  • Work issues set to move code to sage.asymptotic (shortly before positive_review)

comment:52 Changed 4 years ago by git

  • Commit changed from 60b93ab17ef80750fbd053c2219d9bd84fe22bc9 to 2cba56bd14842af761cd4eb7eb1fb56a50424724

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

a33daf9changes part 1 after comments of cheuberg
2cba56brewrite informal description of growth elements and explain description strings

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

  • 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 git

  • Commit changed from 2cba56bd14842af761cd4eb7eb1fb56a50424724 to a39204c67440a804066b1877937cccdca7593e92

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

2a80346Trac #19073: simplify signatures of helper functions in merge_overlapping
1583ffcTrac #19073: Reword and add doctest for _pushout_
8a32f1fcorrect PEP8-spacings in doctest
05862f4Merge branch 't/19073/asy/groups-coercion' into t/19094/asy/ring-exp-log
b160261forgotten changes of last merge
d0c0f15Merge branch 't/19094/asy/ring-exp-log' into t/19083/asy/prototype
a39204cchanges part 2 (of 2) after comments of cheuberg

comment:55 in reply to: ↑ 53 Changed 4 years ago by dkrenn

  • 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 dkrenn

  • 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 behackl

  • Branch changed from u/dkrenn/asy/prototype to u/behackl/asy/prototype
  • Commit changed from a39204c67440a804066b1877937cccdca7593e92 to b7a015029247371f719c2131bbf52c38088f15c6

merged current version of #19094.


New commits:

5562a66add two TODO-blocks
b7a0150Merge branch 'asy/ring-exp-log' into asy/prototype

comment:58 Changed 4 years ago by cheuberg

  • Branch changed from u/behackl/asy/prototype to u/cheuberg/asy/prototype

comment:59 Changed 4 years ago by git

  • Commit changed from b7a015029247371f719c2131bbf52c38088f15c6 to ccf7dcad7f22efb681be2fb49bc8921a30e1de34

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

925cf15Trac #19083: Keep longer versions of previous versions
c9ff643Trac #19083: Adapt description to generalized function
d4df04dTrac #19083: Add/remove missing/superfluous "TESTS::" and "EXAMPLES::"
e7f7708Trac #19083: minor language issues
b997a0eTrac #19083: incomplete formatting
e7ffdf3Trac #19083: additional doctests
ccf7dcaTrac #19083: additional link

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

  • Milestone changed from sage-6.9 to sage-6.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:

  1. misc.split_str_by_op:
    • parameter op: is special treatment of ^^ worthwhile when op ='^' or is that a special case for *?
    • parameter strip_parentheses not tested
    • document and test op is None. This is used in growth_group.Variable.__init__
  2. 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('a-b', '^', 'c')
    'a-b^c'
    sage: repr_op('a+b', '^', 'c')
    '(a+b)^c'
    
  3. 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.
  4. growth_group.log:
    • see comments on growth_group.is_lt_one.
    • error "results in a sum" is not tested.
  5. growth_group.log_factor:
    • why from growth_group import GenericGrowthGroup?
    • see comments on growth_group.is_lt_one
  6. GenericGrowthElement.__ne__: is the "Note" box actually needed?
  7. GenericGrowthElement._rpow_element_:
    • when is the output None?
    • I do not understand "it lives (in contrast to rpow) in its own group".
  8. GenericGrowthGroup._create_element_via_parent_: I do not understand the explanation. Is "via" a good part of the name of the method?
  9. GenericGrowthGroup.gens:
    • why "monomial" growth group in the generic group?
    • why MonomialGrowthElement?
  10. 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 QQ, but in that case, the user explicitly left the integers. It is not clear to me whether this is also the case here.

  1. MonomialGrowthElement._log_factor_:
    • The parameter base is ignored in the second if:
      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.
      
  1. 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 as self).
  2. 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('(1-x)^y')
    (-x + 1)^y
    sage: G('(1+x)^y')
    x + 1^y
    
  3. GrowthGroupFactory: the documentation sounds like ignore_variables=('e',) would only be set when no keywords are given. However, this applies even if only ignore_variables is not set.

comment:61 Changed 4 years ago by git

  • Commit changed from ccf7dcad7f22efb681be2fb49bc8921a30e1de34 to a047f66131002494e5c7d42c1363122f50b769bb

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

442ac03Trac #19083: Missing "EXAMPLES::"
a047f66Trac #19083: Language

comment:62 Changed 4 years ago by cheuberg

Here are my comments on src/sage/rings/asymptotic/growth_group_cartesian.py:

  1. GenericProduct._create_element_via_parent_:
    • see comment 8.
    • Error "Cannot create ... as a cartesian product like ..." not tested.
  2. 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).
  3. GenericProduct.Element.__rpow__: see comment 7.
  4. GenericProduct.Element._rpow_element_: I think that the loop for factor in factors combined with continue makes this more difficult to read than simply saying factor = factors[0] because the length of factors is 1 anyway.

comment:63 Changed 4 years ago by git

  • Commit changed from a047f66131002494e5c7d42c1363122f50b769bb to c5dadf7a1bb3bb7785a49cb4ffd6cadc279a9084

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

532b56fTrac #19083: Minor language adjustments
bb5c08bTrac #19083: Make doctest more explicit by showing intermediate output
7204167Trac #19083: Remove unused part of a doctest
47d7653Trac #19083: Add missing "EXAMPLES::"
c5dadf7Trac #19083: More interesting doctest by including a coefficient

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

Here are my commits and comments on src/sage/rings/asymptotic/term_monoid.py:

  1. Why does a TermMonoid with O need a coefficient ring?
  2. 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?
  3. GenericTerm.log_term: remove first note box, as it is a NotImplementedError anyway?
  4. GenericTermMonoid.__classcall__: Test all errors.
  5. GenericTermMonoid._coerce_map_from_: The code requires that the coefficient ring of S coerces into the coefficient ring of self, which is good, but it should be documented and tested.
  6. GenericTermMonoid._create_element_via_parent_: See comment 8.
  7. 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.
  8. 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.

  1. GenericTermMonoid.__pow__:
    • there is the implicit assumption that 0 = O(g) for any g 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 non-standard 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_.
  2. OTermMonoid._create_element_: test error
  3. TermWithCoefficient._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 in GenericTerm._calculate_pow_.
  4. TermMonoidFactory:
    • documentation should mention that TermMonoid is an instance of TermMonoidFactory.
    • test parameter asymptotic_ring
    • test case that term is a GenericTermMonoid

comment:65 Changed 4 years ago by git

  • Commit changed from c5dadf7a1bb3bb7785a49cb4ffd6cadc279a9084 to 2c60570eb1755791db1a82aa3e3ab70ddbb505c0

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

e2a0c6eTrac #19083: minor language issues
ac9d4bcTrac #19083: ReSt errors
b6ac6c1Trac #19083: abbreviate link
b85176aTrac #19083: break long lines
6b45b79Trac #19083: mark one doctest as indirect
0481cdaTrac #19083: simplify doctest
5867787Trac #19083: o(1) instead of O(1) for use of taylor series
2c60570Trac #19083: additional doctest and explanation

comment:66 follow-ups: Changed 4 years ago by cheuberg

Here are my remaining comments (files src/sage/rings/asymptotic/asymptotic_ring.py and src/sage/rings/big_oh.py):

  1. AsymptoticExpansion.__init__:
    • parameter convert is neither documented nor tested.
    • test error "Cannot include ..."
  2. AsymptoticExpansion._mul_term_: I'd prefer to say simplify = not isinstance(term, ExactTerm) because this seems to be more robust with respect to future extensions.
  3. 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 follow-up ticket.
  4. 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 (follow-up ticket?)
  5. AsymptoticExpansion.log:
    • test error ("several maximal elements")
    • I am not convinced that having k as an AsymptoticExpansion is very efficient (let the division be in QQ and convert later?, cf. rpow.)
  6. 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 ..."
  7. AsymptoticRing: Add some comment on the "TESTS" section which is currently inactive.
  8. AsymptoticRing.change_parameter: is this a good name (the method sounds like an inplace change, but usually returns a new parent instead)
  9. 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: if term.parent() is old_parent, then self.change_parameter will probably not change the parent anyway.
  10. 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 of not data?
    • test error "Symbolic expression ... is not in ..."
    • What happens with an O-Term in SR?
    • conversion of multivariate polynomial ring is not tested.
  11. AsymptoticRing._create_exact_summand_: Why is this needed and not handeled by .create_summand?
  12. 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 of 1.
  13. Delete the following in src/doc/en/reference/rings/index.rst
    .. toctree::
       :hidden:
    
       asymptotic_expansions_index
    

comment:67 Changed 4 years ago by cheuberg

  • Authors changed from Daniel Krenn to Benjamin Hackl, Daniel Krenn
  • 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 dkrenn

  • Branch changed from u/cheuberg/asy/prototype to u/dkrenn/asy/prototype

comment:69 Changed 4 years ago by dkrenn

  • Commit changed from 2c60570eb1755791db1a82aa3e3ab70ddbb505c0 to e8ad893715b0dfc8a3907a05382b0c1cba57b818

Replying to cheuberg:

  1. misc.split_str_by_op:
    • parameter op: is special treatment of ^^ worthwhile when op ='^' 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 in growth_group.Variable.__init__

Added.

  1. 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('a-b', '^', 'c')
    'a-b^c'
    sage: repr_op('a+b', '^', 'c')
    '(a+b)^c'
    

Now included as well.

  1. growth_group.log:
    • see comments on growth_group.is_lt_one.

Done.

  • error "results in a sum" is not tested.

Added.

  1. growth_group.log_factor:
    • why from growth_group import GenericGrowthGroup?

Removed.

  • see comments on growth_group.is_lt_one

Done.

  1. GenericGrowthElement.__ne__: is the "Note" box actually needed?

Not really; deleted.

  1. 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.

  1. 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_.

  1. GenericGrowthGroup.gens:
    • why "monomial" growth group in the generic group?
    • why MonomialGrowthElement?

Cut and paste problem; changed.

  1. 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 QQ, but in that case, the user explicitly left the integers. It is not clear to me whether this is also the case here.

(a^7)^(1/7) is calculated as a^(7*(1/7)), thus the same phenomenon as with ((1/7)*7).parent() appears.

  1. MonomialGrowthElement._log_factor_:
    • The parameter base is ignored in the second if:
      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.

  1. 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 as self).

Example explained.

  1. 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('(1-x)^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.

  1. GrowthGroupFactory: the documentation sounds like ignore_variables=('e',) would only be set when no keywords are given. However, this applies even if only ignore_variables is not set.

Rewritten.


Last 10 new commits:

0ca6efdTrac #19094/#19083 comment 60, 11: correct wrong log and give log in errors a base
71802daTrac #19094/#19083 comment 60, 8: rename to _create_element_in_extension_
e2285e7Trac #19094/#19083 comment 60, 8: rewrite description of _create_element_in_extension_
4cb775fTrac #19094/#19083 comment 60, 12: add doctest in _rpow_element to test parameter base
51f796cTrac #19094/#19083 comment 60, 12: document _rpow_element 2^x
2f110dbTrac #19094/#19083 comment 60, 13: simplify ExponentialGrowthElement._repr_
4c49d02Trac #19094/#19083 comment 60, 14: rewrite keyword arguments documentation of GrowthGroupFactory
d2cc73aadd forgotten "EXAMPLES::" line
498dbadTrac #19094/#19083 comment 60, 15: add a doctest to GenericProduct._create_element_via_parent_
e8ad893Trac #19094/#19083 comment 60, 16: delte misplaced statement in docstring

comment:70 Changed 4 years ago by dkrenn

(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:

  1. 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 dkrenn

Replying to cheuberg:

Here are my comments on src/sage/rings/asymptotic/growth_group_cartesian.py:

  1. GenericProduct._create_element_via_parent_:
    • see comment 8.

Changed.

  • Error "Cannot create ... as a cartesian product like ..." not tested.

Added a test.

  1. 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.

  1. GenericProduct.Element.__rpow__: see comment 7.

Rewritten.

  1. GenericProduct.Element._rpow_element_: I think that the loop for factor in factors combined with continue makes this more difficult to read than simply saying factor = factors[0] because the length of factors is 1 anyway.

Rewritten.

comment:72 Changed 4 years ago by git

  • Commit changed from e8ad893715b0dfc8a3907a05382b0c1cba57b818 to b66497d7e1dfe12d486b0c50bef65547f28ed44f

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

c5dadf7Trac #19083: More interesting doctest by including a coefficient
e2a0c6eTrac #19083: minor language issues
ac9d4bcTrac #19083: ReSt errors
b6ac6c1Trac #19083: abbreviate link
b85176aTrac #19083: break long lines
6b45b79Trac #19083: mark one doctest as indirect
0481cdaTrac #19083: simplify doctest
5867787Trac #19083: o(1) instead of O(1) for use of taylor series
2c60570Trac #19083: additional doctest and explanation
b66497dMerge remote-tracking branch 'origin/u/cheuberg/asy/prototype' into t/19083/asy/prototype

comment:73 in reply to: ↑ 60 Changed 4 years ago by dkrenn

Replying to cheuberg:

I pushed some reviewer commits here and add my comments here.

Cross-reviewed. Fine.

Last edited 4 years ago by dkrenn (previous) (diff)

comment:74 Changed 4 years ago by cheuberg

  • Branch changed from u/dkrenn/asy/prototype to u/cheuberg/asy/prototype

comment:75 Changed 4 years ago by git

  • Commit changed from b66497d7e1dfe12d486b0c50bef65547f28ed44f to 51f699d5209bae5fb70201e1da0df0b0442ad40d

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

8f57fa1Trac #19083: Insert external link
6c00163Trac #19083: minor language issues
51f699dTrac #19083: fix dead link by explicitly naming GenericGrowthElement

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

I reviewed your changes so far (misc, growth_group, growth_group_cartesian) and pushed three minor commits. Once you have cross-reviewed these three, these three files are fine for me.

comment:77 Changed 4 years ago by dkrenn

  • Branch changed from u/cheuberg/asy/prototype to u/dkrenn/asy/prototype

comment:78 in reply to: ↑ 76 Changed 4 years ago by dkrenn

  • 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 cross-reviewed these three, these three files are fine for me.

Fine for me.


Last 10 new commits:

e458cd4Trac #19094/#19083 comment 64, 25: add doctests to GenericTermMonoid._split_growth_and_coefficient_
d492447Trac #19094/#19083 comment 64, 27: document assumption 0 = O(g)
c6fdfc0Trac #19094/#19083 comment 64, 27: add test in __pow__ to check errors
cacd890Trac #19094/#19083 comment 64, 28: test error in OTermMonoid._create_element_
5219671Trac #19094/#19083 comment 64, 29: fix broken link
d4a447fTrac #19094/#19083 comment 64, 29: TermWithCoefficient._calculate_pow_: test ArithemticError
086b62dTrac #19094/#19083 comment 64, 30: TermMonoidFactory: note block to refer to instance TermMonoid
7647952write docstrings for the factory instances
7e4e823Trac #19094/#19083 comment 64, 30: more doctests in TermMonoidFactory
3fdb4dcMerge 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 dkrenn

Replying to cheuberg:

  1. Why does a TermMonoid with O need a coefficient ring?

To make it clear and explicit which parts of an expression are allowed to be eaten up by the O-Term. For example, having a symbolic x*y and R = AsymptoticRing('x^ZZ', QQ), then O(x*y) should not silently be possible in R`.

  1. 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.

  1. GenericTerm.log_term: remove first note box, as it is a NotImplementedError anyway?

Removed.

  1. GenericTermMonoid.__classcall__: Test all errors.

Are tested now.

  1. GenericTermMonoid._coerce_map_from_: The code requires that the coefficient ring of S coerces into the coefficient ring of self, which is good, but it should be documented and tested.

Extended doc.

  1. GenericTermMonoid._create_element_via_parent_: See comment 8.

Done.

  1. 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.

  1. 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.

#19421.

  1. GenericTermMonoid.__pow__:
    • there is the implicit assumption that 0 = O(g) for any g 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 non-standard 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.

  1. OTermMonoid._create_element_: test error

Added doctest.

  1. 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 in GenericTerm._calculate_pow_.

I've renamed coefficient to new_coefficient to make the difference between the methods clearer.

  1. TermMonoidFactory:
    • documentation should mention that TermMonoid is an instance of TermMonoidFactory.

Note block added and docstring to instances added as well.

  • test parameter asymptotic_ring

Tests added.

  • test case that term is a GenericTermMonoid

Tests added.

comment:80 Changed 4 years ago by git

  • Commit changed from 3fdb4dcee28c67dd076a6552580c8ab15811924a to d582c1345a788d5b8eba1b5d6e0734378f4559c4

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

728ccf9Trac #19094/#19083 comment 66, 30: document parameter convert
a7f7fafTrac #19094/#19083 comment 66, 31: test parameter convert
7a27e68Trac #19094/#19083 comment 66, 31: Doctest error
ad645aaTrac #19094/#19083 comment 66, 32: change simplification check to "not exact term"
d582c13Trac #19094/#19083 comment 66, 29: rename coefficient to new_coefficent (_calculate_pow_)

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

Finished with the terms. Needs cross-review. I will now look at the ring...

comment:82 Changed 4 years ago by cheuberg

  • Branch changed from u/dkrenn/asy/prototype to u/cheuberg/asy/prototype

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

  • Commit changed from d582c1345a788d5b8eba1b5d6e0734378f4559c4 to 0042756990b86f3b0ac536fe64d14c32fb2033a0

Replying to dkrenn:

Finished with the terms. Needs cross-review.

Reviewed and added two commits. Please cross-review those. After that, only the asymptotic_ring is still to do.


New commits:

57eb7ccTrac #19083: Mention "GrowthGroup" in docstring of "GrowthGroupFactory"
0042756Trac #19083: added doctest (comment 64.23)

comment:84 Changed 4 years ago by dkrenn

  • Branch changed from u/cheuberg/asy/prototype to u/dkrenn/asy/prototype

comment:85 in reply to: ↑ 83 Changed 4 years ago by dkrenn

  • Commit changed from 0042756990b86f3b0ac536fe64d14c32fb2033a0 to 44b52d61e4c1e3229ee8f3ae7c2c375a67bbc247

Replying to cheuberg:

Replying to dkrenn:

Finished with the terms. Needs cross-review.

Reviewed and added two commits. Please cross-review those.

Commits are fine.


New commits:

57eb7ccTrac #19083: Mention "GrowthGroup" in docstring of "GrowthGroupFactory"
0042756Trac #19083: added doctest (comment 64.23)

New commits:

59db437sort maximal elements in error string
7ca2b7fTrac #19094/#19083 comment 66, 33: test errors in __invert__
12e8e52Trac #19094/#19083 comment 66, 34: not tested in __pow__: refer to #19316
0845655Trac #19094/#19083 comment 66, 34: __pow__ add error tests
3fe96bfsort maximal elements in error string
5ca69eaTrac #19094/#19083 comment 66, 35: doctest errors of log
cb55faaTrac #19094/#19083 comment 66, 35: improve speed of log
d925157Trac #19094/#19083 comment 66, 36: rpow: decrease indention of ALGORITHM block
44b52d6Merge branch 'u/cheuberg/asy/prototype' of trac.sagemath.org:sage into t/19083/asy/prototype

comment:86 Changed 4 years ago by dkrenn

Replying to cheuberg:

  1. AsymptoticExpansion.__init__:
    • parameter convert is neither documented nor tested.

Now it is.

  • test error "Cannot include ..."

Doctest added.

  1. AsymptoticExpansion._mul_term_: I'd prefer to say simplify = not isinstance(term, ExactTerm) because this seems to be more robust with respect to future extensions.

True, good idea; changed.

  1. AsymptoticExpansion.__invert__:
    • test errors

Done.

comment:87 Changed 4 years ago by dkrenn

  1. 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 follow-up 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 dkrenn

  1. 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 (follow-up ticket?)

A ticket (#19316) already exists.

  1. AsymptoticExpansion.log:
    • test error ("several maximal elements")

Added.

  • I am not convinced that having k as an AsymptoticExpansion is very efficient (let the division be in QQ and convert later?, cf. rpow.)

Changed and made some tests: I could save about 15% cputime :)

Rest will follow later today.

comment:89 Changed 4 years ago by git

  • Commit changed from 44b52d61e4c1e3229ee8f3ae7c2c375a67bbc247 to 80068372f79a2e804be5c864b51bac9a1c75498a

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

2522bd0Trac #19094/#19083 comment 66, 36: add error test
8cbacdfTrac #19094/#19083 comment 66, 37: refer to #19424 in not tested doctest
ec10395Trac #19094/#19083 comment 66, 39: extend description of old_parent (in
36a48e4Trac #19094/#19083 comment 66, 39: _create_element_in_extension_ rewrite doctests and rename parameter to old_term_parent
38a597bTrac #19094/#19083 comment 66, 40: remove outdated NOTE block
b927671Trac #19094/#19083 comment 66, 40: complete doctests of AsymptoticRing._element_constructor_
7624627Trac #19094/#19083 comment 66, 40: refer to trac tickets at O-Term from SR todo
1ceba10Trac #19094/#19083 comment 66, 40: test conversion from multivariate polynomial ring
8006837Trac #19094/#19083 comment 66, 40: simplify test for empty data

comment:90 in reply to: ↑ 66 Changed 4 years ago by dkrenn

Replying to cheuberg:

  1. AsymptoticExpansion.rpow:
    • Decrease indentation of ALGORITHM block

Done.

  • Test error "Cannot construct the power ..."

Added test.

  1. AsymptoticRing: Add some comment on the "TESTS" section which is currently inactive.

Added (#19424).

  1. 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
  1. 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: if term.parent() is old_parent, then self.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.

  1. 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 of not data?

Changed.

  • What happens with an O-Term 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.

  1. 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 git

  • Commit changed from 80068372f79a2e804be5c864b51bac9a1c75498a to a848139a35e95bfd67d9964fa7412743942de4a4

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

4e5af11Trac #19094/#19083 comment 66, 36: delete ALGORITHM block
cb083d4Trac #19094/#19083 comment 66, 41: delete _create_exact_summands_ since not needed
cf228bbTrac #19094/#19083 comment 66, 42: make creating of exact summand with growth but without coefficient impossible
a848139Trac #19094/#19083 comment 66, 42: create_summands: add doctests for interesting `data`

comment:92 in reply to: ↑ 66 Changed 4 years ago by dkrenn

Replying to cheuberg:

  1. 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.

  1. 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.

  1. AsymptoticRing._create_exact_summand_: Why is this needed and not handeled by .create_summand?

Deleted and remaining code adapted.

  1. 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^2
    
    I'd rather expect an error or zero than using an implicit coefficient of 1

Changed; now there is an error.

comment:93 Changed 4 years ago by cheuberg

  • Branch changed from u/dkrenn/asy/prototype to u/cheuberg/asy/prototype

comment:94 Changed 4 years ago by git

  • Commit changed from a848139a35e95bfd67d9964fa7412743942de4a4 to f9fbccb030e9a665ce76b5bd8032be852b968753

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

de137d1Trac #19083: fix one ReSt error
f9fbccbTrac #19083: expand description of parameter "convert"

comment:95 Changed 4 years ago by cheuberg

  • 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 vbraun

  • Branch changed from u/cheuberg/asy/prototype to f9fbccb030e9a665ce76b5bd8032be852b968753
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.