Open yyyyx4 opened 7 months ago
@mwageringel This seems related to some code you touched in #33217; could you maybe have a look? I don't know much about this topic.
Uh oh, the problem is that the quotient ideal I
is not a Gröbner basis, but that is required by the Singular backend:
4.19.1 qring SINGULAR offers the opportunity to calculate in quotient rings (factor rings), i.e., rings modulo an ideal. The ideal has to be given as a standard basis.
Indeed:
sage: 1 in R.quotient(R.ideal(I).groebner_basis()).ideal(J)
True # correct
The relevant implementation is https://github.com/sagemath/sage/blob/30b3d78fac8d4a015ad2641cad44c3d530f4c10c/src/sage/rings/polynomial/multi_polynomial_ideal.py#L5648-L5655 where already line 5649 does not yield a meaningful result in this case.
I do not see a simple fix other than to throw an error if the defining ideal of the quotient ring is not already a Gröbner basis. Otherwise, one would have to replace the quotient ring by one that is defined in terms of a Gröbner basis, but that would be an awkward thing to do in the reduce
method unless some caching mechanism is used.
Why can't it just compute a Gröbner basis on demand when needed and cache it after the first time? I was under the impression that this is how things are done all over the multivariate codebase, is it not?
Issue #33982 may be related. Both issues may have caused by buggy implementation of ideals over non-fields.
Sage 10.3.beta8:
See also #33217.