-
Notifications
You must be signed in to change notification settings - Fork 73
Forbid residue_ring for zero rings for technical reasons
#1857
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1857 +/- ##
==========================================
+ Coverage 88.00% 88.33% +0.33%
==========================================
Files 127 126 -1
Lines 31798 31765 -33
==========================================
+ Hits 27983 28060 +77
+ Misses 3815 3705 -110 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thank you! This triggers a bunch of errors
|
|
Since this causes failures, perhaps we can introduce this incrementally: separate PRs for the series rings (which are not much used so hopefully won't break any upstream tests), matrix rings (heavily used but perhaps still will go through), universal polynomial rings (should go through) and finally polynomial rings (causing problems) |
|
The problem with MPolyQuoRing is that it may indeed be trivial. But we need a groebner basis computation to decide that |
|
Is there a reason that residue rings, matrices and fraction fields are also restricted? I was mainly thinking about polynomials and series, because the code there is wrong. |
I put one in all constructions that take a ring. If you verified that the code for these other types isn't wrong, I am happy to take it out again |
|
It is correct for matrices. For fraction fields it gives errors in some situations, but no wrong results. |
I'll split this PR up into multiple ones. |
254eb62 to
e26b4c9
Compare
|
Matrices are removed from this again. |
ef779e1 to
2b22d78
Compare
src/ResidueField.jl
Outdated
| to the constructor with the same base ring $R$ and element $a$. | ||
| """ | ||
| function residue_field(R::Ring, a::RingElement; cached::Bool = true) | ||
| @req !is_trivial(R) "Zero rings are currently not supported as base ring." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here, too, we could remove the "currently", as any quotient of a zero ring can't be a field.
|
OscarCI and HeckeCI failures: for Oscar, see oscar-system/Oscar.jl#4239 For Hecke, getting several errors: and |
2b22d78 to
37b8a64
Compare
|
Even in the case that we fix all of the downstream issues, this needs to get released in a breaking release, to not accidentally breaking Oscar 1.2 |
|
More Oscar woes: |
But which of the Nemo coeff types even allows zero rings? |
|
None at the moment, but with this approach here I cannot fix the generic ones without fixing the Nemo ones. |
|
So how do we proceed here? It seems there is some overlap resp. "tension" with PR #1910. Also a bunch of tweaks to this PR here have been suggested but not yet applied. Would it make sense to split off yet another PR from this with the changes which do not clash with #1910, e.g. for |
f6328b1 to
b570971
Compare
|
Yes for generic polynomials from AA but no for polynomials coming from flint: |
|
Wait, I think I might have fixed the things for flint: https://github.com/flintlib/flint/pulls?q=is%3Apr+author%3Athofma Let me try to open a PR in Nemo with some tests. |
|
After Nemocas/Nemo.jl#2195 we should be able to remove it. |
@req !is_trivial checks@req !is_trivial checks
@req !is_trivial checksresidue_ring for zero rings for technical reasons
fingolfin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the (m)poly changes (as discussed: they were no long needed). All that is left are changes to two residue_ring methods. Therefore I've also changed the title of this PR.
@lgoettgens hope you don't mind I've messed with this, please holler if I messed stuff up.
Thanks for taking over! |
Resolves #1856.
List of split of changes: