-
-
Notifications
You must be signed in to change notification settings - Fork 559
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
Force tail reduction in polynomial quotient ring #27508
Comments
comment:1
Thanks, one would put "author" in only if intended to provide a patch soon. |
Changed author from Rachel Player to none |
comment:3
Thanks, in that case I have removed my name from "author". |
comment:4
Singular understand option And if I define |
comment:5
The following appears to fix this, although I don't really now why... --- a/src/sage/libs/singular/ring.pyx
+++ b/src/sage/libs/singular/ring.pyx
@@ -50,7 +50,7 @@ from collections import defaultdict
order_dict = {
"dp": ringorder_dp,
"Dp": ringorder_Dp,
- "lp": ringorder_lp,
+ "lex": ringorder_lp,
"rp": ringorder_rp,
"ds": ringorder_ds,
"Ds": ringorder_Ds,
|
comment:7
The file "src/sage/rings/polynomial/term_order.py" might be related. |
comment:8
This bug is already in Sage 8.1, that's as far back as I went. Broken lex order should be a blocker, I think... |
comment:9
Replying to @dimpase:
If a bug is that old and nobody noticed before, then surely it's not serious enough to warrant blocker status? But I'll let the release manager judge that. |
comment:10
Replying to @dimpase:
What do you mean with "still works"? At the places where |
comment:11
Replying to @nbruin:
No, an unknown value of
|
comment:12
I suspect it is easy to fix, as it's some sort of translation issue between orders of Sage and orders of Singular, and people who wrote it are reading this ticket, I gather. Please, please, do something, it is very serious, a broken Groebner basis for lex order is really a blocker. |
comment:13
If the bug is already in Sage 8.1, Sage 8.2, Sage 8.3, Sage 8.4, Sage 8.5 and Sage 8.6, would it really make such a big difference to have the same bug also in Sage 8.7? But it doesn't matter what I think, the release manager will decide. |
comment:14
I also checked now that it is already in 7.4. This is a bug of the type "2+2=5", if you ask me, it's a shame to release anything with this kind of thing knowingly broken without either a fix or a fat warning somewhere... |
comment:15
I chased this issue a little more. It seems that there is no problem in the translation. Perhaps it is a deeper issue. Ultimately the normal form computation occurs in the code starting from line 283 in Someone else who knows libSingular well, not me, is invited to look into it. |
comment:16
Replying to @kwankyu:
This does not explain why after the change in comment:5
even though if So you see above the order is
at this point the order is already set. From the conversation about it appears that nobody knows the real purpose
|
comment:17
Replying to @nbruin:
please also see comment:16 about this - no, at no point here the "internal" Singular's order becomes |
comment:18
More about the bug: it appears that only the 1st term is reduced:
(similarly with 3 variables...) Now, reading code tells me that
and gets the wrong answer. If it didn't work then it'd try to reduce using an explicit Groebner basis for
So indeed it's that |
comment:19
We don't really promise anywhere to do tail reduction I think; Singular does the right thing by default but also not necessarily:
While we should do tail reduction there is nothing mathematically wrong, so imho no blocker. |
comment:21
Replying to @vbraun:
yes we do:
and here we see different reductions depending upon the chosen implementation for the ring, nothing one can call "unique up to monomial orders". Perhaps Sage should allow for not doing the tail reduction, but it must not be the default in any case (it's not the default in Singular, the optional 3rd argument in |
comment:44
git blame ascribes this to the original check-in of the file groebner_strategy.pyx (by Martin Albrecht), so we've never done differently. Given that we have pretty authoritative advice now, I think it would be reasonable to just ascribe it to incomplete information at the time, and make the change now. If there was a good reason, we'll discover it ... |
comment:45
the advice is from 3rd author of |
comment:46
To add to the worry: I have no recollection why I did what I did. |
Changed author from Dima Pasechnik to none |
comment:48
As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9). |
Branch: u/dimpase/singular/singu_nf |
comment:50
by popular demand, a minimal patch. New commits:
|
This comment has been minimized.
This comment has been minimized.
Commit: |
Author: Dima Pasechnik |
comment:52
Here is another example that seems to be solved by this. This does not involve a
However, I could not find any documentation whatsoever on this
|
comment:53
Frankly, the whole libsingular interface is hard to maintain, as it relies on undocumented functionality. I went and read source to figure out what that flag does. |
comment:54
I think making use of kNF is a bit too major a rewrite of the libsingular interface for me to attempt it. |
comment:55
Ok, fair enough. The whole Therefore, I am setting this to positive. The issue this ticket solves is a huge pain, as equality testing in some quotient rings is completely broken, which defeats the point of using quotient rings in the first place. Thanks for finding a solution. |
Reviewer: Markus Wageringel |
Changed branch from u/dimpase/singular/singu_nf to |
Changed commit from |
I'd like to "remove squares" in some polynomials living in a polynomial ring over
QQ
, in 2 variables:x
,y
. I tried to implement this by modding out by the ideal(x^2 - x, y^2 - y)
. Depending on the ordering, the result of.mod()
does not always output the polynomial I am looking for.Without specifying an ordering, everything seems fine:
However, when specifying the order
lex
the reduction ofx + y^2
is not as expected:This issue was reported in sage-support where it was pointed out that it is likely a bug in Singular, or in the Singular interface to Sage.
In particular, using the order
lex
works whenimplementation="generic"
is also specified:For reference, I am using Sage version 8.6 on macOS Mojave 10.14.3.
PS. see also https://groups.google.com/d/msg/sage-devel/K49-V3BbWbg/pxuoehPvAAAJ
CC: @simon-king-jena @malb @mwageringel
Component: commutative algebra
Keywords: multivariate polynomial, quotient ring, singular
Author: Dima Pasechnik
Branch:
21e4f9a
Reviewer: Markus Wageringel
Issue created by migration from https://trac.sagemath.org/ticket/27508
The text was updated successfully, but these errors were encountered: