-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
cleaning and enhancement to PolyDict #34000
Comments
This comment has been minimized.
This comment has been minimized.
Branch: u/vdelecroix/34000 |
Commit: |
comment:3
Two things that I did not understand while skimming through the code:
|
comment:4
Replying to @mezzarobba:
Thanks for having a look.
I shamefully copied the code from univariate polynomials, see polynomial_element.pyx#L3980-L3985
One of them is ensuring that keys are |
comment:5
Replying to @videlec:
Sorry, my question was not clear. I was mostly wondering why you were raising |
comment:7
Replying to @mezzarobba:
It is really a |
comment:8
I hope I clarified the code related to your comments in 6eac6b0 and 065d42e. |
comment:9
Let me change |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:12
In the last commit I fixed a bug in New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:16
This affects code such as
which now returns On the other hand, I believe that the code in Tate algebra is buggy for the following reason. The conversion
The following is also broken
(it should have been The main question is : how do we test whether an element is exactly zero in |
comment:17
For the same reason as in comment:16 multivariate polynomials over p-adics are similarly broken in the current sage
|
comment:18
Replying to @videlec:
hmm as well as multivariate polynomial rings over power series
|
comment:19
Replying to @videlec:
I think you can use the method I'll have a look at the bug in coercion from base ring to Tate algebra you noticed. |
comment:20
Replying to @xcaruso:
Thanks. Though very specific to p-adics. And it does not exist for power series.
It is not a bug in the coercion system. It is the way elements of the Tate algebra are constructed. The |
comment:21
As far as this ticket is concerned there is an easy way out : leave simplification of zero coefficients in I opened ticket #34024 to fix polynomials. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:23
Also, it did not magically fix comment:16 since Tate algebras use multivariate polynomials over p-adic rings... |
comment:24
Replying to @videlec:
Hmm. Difficult to say what is the correct answer. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:26
rebased on 9.7.beta8 and failing doctests modified |
comment:27
green bot |
comment:28
I think some timings are needed here before a positive review to see what sort of speed regressions we incur because we no longer have the option to turn off certain features and checks. Why is addition the only operation that gets a special in-place operation? I think it would be good to make this universal. It is generally not a good ideal to check Naively coverage seems to have decreased; e.g., |
Removed branch from issue description; replaced by PR #35020 |
Just for reference, I want to point out that PR #35174 also seems to fix another bug with The problem seems independent of the nonzero values (the 1's) and seems to persist in lengths 4 and more. E.g. With PR #35174 , and I suppose thanks to this commit , this issues appears to have been solved. |
Indeed, the |
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> ### 📚 Description Fixes #34000 (and more complete version of the proposition at #35020). A discussion about the general problem of inexact zeros has been opened at #35319 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I have made sure that the title is self-explanatory and the description concisely explains the PR. - [x] I have linked an issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. URL: #35174 Reported by: Vincent Delecroix Reviewer(s): Frédéric Chapoton, Travis Scrimshaw, Vincent Delecroix
We provide some cleaning and speed up to the
PolyDict
class by always enforcing keys to beETuple
(some parts of the code did assume that was the case). As a consequence we deprecate the usage of the constructor argumentsforce_int_exponents
andforce_etuples
.We also simplify the design by getting rid of
PolyDict.__zero
(and hence deprecating the argumentzero
of thePolyDict
constructor).Along the way, we fix
and
CC: @xcaruso @mezzarobba @saraedum
Component: algebra
Author: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/34000
The text was updated successfully, but these errors were encountered: