Opened 12 years ago
Closed 3 years ago
#6472 closed defect (worksforme)
ideal.groebner_basis gives incorrect answers
Reported by: | broune | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | commutative algebra | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Reported upstream. Developers acknowledge bug. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: | todo |
Description (last modified by )
This is wrong:
sage: R.<a,b,c,d>=PolynomialRing(QQ,order="lex") sage: ideal(a-b^16,b-c^16,c-d^1024).groebner_basis() [a - d^4096, b - d^16384, c - d^1024]
The correct answer as given by Macaulay 2:
i30 : R=QQ[a,b,c,d, MonomialOrder=>Lex]; i31 : I=ideal(a-b^16,b-c^16,c-d^1024); i32 : gens gb I o32 = | c-d1024 b-d16384 a-d262144 |
In particular the binomial involving a should raise d to the power 262144=2^{18}, not 4096=2^{12} as Sage reports.
I suspect that the reason is that by default Sage uses Singular to implement groebner_basis, and Singular has limitations on the size of exponents. See https://www.singular.uni-kl.de/Manual/4-0-2/sing_455.htm which in particular says
the maximal allowed exponent of a ring variable depends on the ordering of the ring and is at least 32767.
(I suppose "least" is a typo, should be "most"...)
Change History (14)
comment:1 Changed 12 years ago by
- Milestone changed from sage-4.1 to sage-4.1.1
comment:2 Changed 11 years ago by
- Component changed from algebra to commutative algebra
comment:3 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:4 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:5 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:6 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:7 Changed 6 years ago by
- Report Upstream set to N/A
- Stopgaps set to todo
comment:8 Changed 5 years ago by
- Report Upstream changed from N/A to Reported upstream. No feedback yet.
comment:9 Changed 5 years ago by
another funny example :
R.<b,c,d>=PolynomialRing(QQ,order="lex") sage: ideal(b-c^64,c-d^1024).groebner_basis()
(wrong result and zero not shown)
[b - , c - d^1024]
comment:10 Changed 5 years ago by
- Description modified (diff)
Does Singular simply return incorrect results, or it's rather a Sage interface bug?
comment:11 Changed 5 years ago by
- Report Upstream changed from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.
fixed in https://github.com/Singular/Sources/commit/349e5e898aad7e735b03bda328f2741a7c36a092
broken again for 'groebner' with https://github.com/Singular/Sources/commit/17510a828cdc33aa541d40a9bbfb825b72812521
comment:12 Changed 3 years ago by
- Status changed from new to needs_review
sage: R.<a,b,c,d>=PolynomialRing(QQ,order="lex") ....: sage: I = ideal(a-b^16,b-c^16,c-d^1024) sage: I.groebner_basis() skipping text from `)` error at token `)` --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) RuntimeError: Error raised calling singular function ... RuntimeError: error in Singular function call 'groebner': exponent bound is 65535 error occurred in or before standard.lib::stdhilb line 381: ` i=interred(i);` leaving standard.lib::stdhilb leaving standard.lib::groebner
Looks good to me.
comment:13 Changed 3 years ago by
- Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
This
skipping text from `)` error at token `)`
looks ugly, but otherwise there seems nothing to fix here---unless nowadays Singular offers an option to have bigger exponents.
comment:14 Changed 3 years ago by
- Resolution set to worksforme
- Status changed from needs_review to closed
reported upstream:
https://www.singular.uni-kl.de:8005/trac/ticket/774#ticket