New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynatomic polynomial bug for fractional coefficients #18409
Comments
Branch: u/bhutz/ticket/18409 |
comment:2
I fixed a number of cases where Symbolic Ring was being returned by changing how the conversion was being done and not doing the (unnecessary) division in the [0,1] case. There are still some obscure cases where we can't get back from the Symbolic Ring. Such as certain maps where the coordinate ring is a function field over QQbar. New commits:
|
Commit: |
Author: Ben Hutz |
comment:4
Hello, Just curiosity, why maxima is involved in this division? Also, could you add doctests corresponding to the fixed issues? Vincent |
comment:5
In the very same same functions, both the
could you move it before? |
comment:7
- if (isinstance(period, (list, tuple)) is False):
+ if not isinstance(period, (list, tuple)): |
comment:8
This is very strange
You can easily predict when this happen: every time excepted the last run of the loop. But with the above code you test in each run of the loop whether |
comment:9
Thanks for the comments Vincent. I can certainly make those code improvements. For the examples, I wasn't sure about adding them. What is changing here is the parent of the result, not the actual result. In particular, the new version is converting some of the Symoblic Ring cases back to a polynomial. So a new example would need to test the parent of the result, which seemed a little odd. Maxima was originally involved because there were cases where the quo_rem function was not doing the division; I believe cases like the base ring is a function field or polynomial ring. Maxima is able to do this division. I'll run some more tests and see if the pass to Maxima is still needed, or if we can avoid that situation completely. |
comment:10
Hi Ben, Replying to @bhutz:
It will be very useful to detect regression. You can add something along
If the parent changes, then the result does change! This kind of things is exactly the purpose of the Vincent |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Those changes are made and I added a comment about Maxima. I had forgotten about the TESTS section. I've added those examples there and improved one of the EXAMPLES. |
Changed branch from u/bhutz/ticket/18409 to public/18409 |
comment:13
Hello, I did further cleanup (see the new branch In the case the ring is wrong, I would emit a warning to alert the user. See python module warnings. Just put
The handling of warnings is not yet fantastic in Sage since this will be only used once... (at the second call nothing happens). But at least the user will be noticed. Vincent New commits:
|
Reviewer: Vincent Delecroix |
comment:14
Those changes look fine, although I find it a little weird to clean-up nth_iterate_map() inside the ticket for dynatomic_polynomial(), but those changes test out fine for me. I played around with the user warning and it really is not helpful. It is clearly stated in the doc for the function what is happening. I could see an argument for an actual warning block in the docs, but not the message printed to the user. How strongly do you want to see a user warning? Not sure what 'needs-info' on this ticket? |
comment:15
Replying to @bhutz:
The problem is that some people might not read the whole documentation of the function before using it. This is not very important though.
'needs-info' is because I had a pending question. Vincent |
Changed branch from public/18409 to |
Changed commit from |
Dynatomic polynomial returns a symbolic ring element when passed a map with a constant denominator != 1:
Component: algebraic geometry
Author: Ben Hutz
Branch:
ef769e2
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/18409
The text was updated successfully, but these errors were encountered: