#19083: AsymptoticRing: cleanup, some improvements, documentation
-------------------------------------+-------------------------------------
Reporter: dkrenn | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: asymptotic | Resolution:
expansions | Merged in:
Keywords: | Reviewers: Clemens Heuberger
Authors: Daniel Krenn | Work issues:
Report Upstream: N/A | Commit:
Branch: | c5dadf7a1bb3bb7785a49cb4ffd6cadc279a9084
u/cheuberg/asy/prototype | Stopgaps:
Dependencies: #19094 |
-------------------------------------+-------------------------------------
Comment (by cheuberg):
Here are my commits and comments on
`src/sage/rings/asymptotic/term_monoid.py`:
19. Why does a `TermMonoid` with `O` need a coefficient ring?
20. `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?
21. `GenericTerm.log_term`: remove first note box, as it is a
`NotImplementedError` anyway?
22. `GenericTermMonoid.__classcall__`: Test all errors.
23. `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.
24. `GenericTermMonoid._create_element_via_parent_`: See comment 8.
25. `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.
26. `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.
27. `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_`.
28. `OTermMonoid._create_element_`: test error
29. `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_`.
30. `TermMonoidFactory`:
- documentation should mention that `TermMonoid` is an instance of
`TermMonoidFactory`.
- test parameter `asymptotic_ring`
- test case that `term` is a `GenericTermMonoid`
--
Ticket URL: <http://trac.sagemath.org/ticket/19083#comment:64>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.