-
Notifications
You must be signed in to change notification settings - Fork 160
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
Fix StandardAssociateUnit for polynomial rings to return a polynomial, not an element of the coefficient ring #3611
Conversation
By definition in the documentation, the returned unit must be an element of the ring.
d9945d7
to
14b7293
Compare
Codecov Report
@@ Coverage Diff @@
## master #3611 +/- ##
===========================================
- Coverage 84.64% 72.27% -12.37%
===========================================
Files 698 635 -63
Lines 345549 308790 -36759
===========================================
- Hits 292482 223174 -69308
- Misses 53067 85616 +32549
|
What would the documentation say in the case? Something like
I think it would also need an explanation for why it was this way, otherwise it would seem a bit weird. To be honest I don't really mind, I've never used this function directly and don't think I would do anytime soon. From my mathematical point of view, I think I prefer the behaviour and documentation as this PR makes things. I understand the inefficiency side of things. Could this be perhaps accommodated with another function with a different name? |
I suggest we backport this to 4.11, simply because several other fixes for |
Yes, please backport. |
Backported in commit a3d9c0a |
By definition in the documentation, the returned unit must be an element of the ring.
The drawback of this is that it makes
StandardAssociateUnit
a bit less efficient: converting the unit into a polynomial introduces overhead in terms of memory and runtime. And for typical applications of this (e.g. implementing row reductions in a matrix), it doesn't matter, as all we really need is that for inputsa
andb
we get a "unit"u
such thata * u = b
anda = b * u^-1
hold.So an alternative to this PR would be to adjust the documentation, and also
checkStandardAssociate
.Thoughts, anybody?