-
Notifications
You must be signed in to change notification settings - Fork 71
Make evaluate for universal polynomials more universal
#2214
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
base: master
Are you sure you want to change the base?
Conversation
949ad8f to
107ff45
Compare
|
Some previously failing tests were caused by the evaluation of mpoly. Apparently it is not possible to evaluate an mpoly in a ring with no variables at an empty vector with element type univariate polynomial, even though this is possible if the element type is |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2214 +/- ##
==========================================
+ Coverage 88.00% 88.06% +0.05%
==========================================
Files 127 127
Lines 31801 31759 -42
==========================================
- Hits 27986 27967 -19
+ Misses 3815 3792 -23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The doctest failures with julia 1.10 seem to be unrelated. |
Reasoning behind this: If you evaluate at an empty vector with element type univariate polynomial, the result is a univariate polynomial. But how should the result know its parent Univariate poly ring? |
Yesterday, I came to this conclusion as well. But I'm still a bit confused why things like this work in that way: While this works as expected: I'm not so sure if evaluating at empty vectors in general is such a good idea, but perhaps I'm missing an important application. |
|
I think it is fine to error on empty vectors. |
|
Yeah, empty vector is bad and we should error for now. If someone misses it, we could add it back with some target ring for the evaluation. (Similar to |
ba9900f to
cdaa8a5
Compare
As mentioned in #2211 I've reworked the evaluation for universal polynomials. Perhaps we should add tests for the new edge cases. Evaluating at one vector always returns an element of the coercion of the provided elements in the vector an the coefficients of the polynomial. Evaluating at two vectors (one for the variable indices and one for the values) will always return a universal polynomial. All variables which aren't present yet will be ignored.