Opened 7 years ago
Closed 6 years ago
#3028 closed defect (fixed)
[with patch, positive review] Ideals in multivariate polynomial rings with no variables raise exception on comparison
Reported by: | broune | Owned by: | broune |
---|---|---|---|
Priority: | major | Milestone: | sage-3.0.2 |
Component: | commutative algebra | Keywords: | multivariate polynomial ring, no variables |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This code
ring = PolynomialRing?(QQ, names=[])
id = ring.ideal(0)
print id == id
gives the following error message
<type 'exceptions.StopIteration?'> Traceback (most recent call last)
/Users/bjarke/sync/<ipython console> in <module>()
/Users/bjarke/sync/element.pyx in sage.structure.element.Element.richcmp (sage/structure/element.c:4558)()
/Users/bjarke/sync/element.pyx in sage.structure.element.Element._richcmp (sage/structure/element.c:4453)()
/Users/bjarke/sage-3.0/local/lib/python2.5/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py in cmp(self, other)
347 True
348 """
--> 349 l = self.groebner_basis()
350 r = other.groebner_basis()
351 return cmp(r,l)
/Users/bjarke/sage-3.0/local/lib/python2.5/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py in groebner_basis(self, algorithm, *args, kwds)
1836 except TypeError?: # conversion to Singular not supported
1837 # we might want to print a warning here
-> 1838 gb = toy_buchberger.buchberger_improved(self, *args, kwds)
1839 elif algorithm.startswith('singular:'):
1840 gb = self._groebner_basis_using_singular(algorithm[9:])
/Users/bjarke/sage-3.0/local/lib/python2.5/site-packages/sage/rings/polynomial/toy_buchberger.py in buchberger_improved(F)
232 print "%d reductions to zero."%(reductions_to_zero)
233
--> 234 return Sequence(inter_reduction(G))
235
236 def update(G,B,h):
/Users/bjarke/sage-3.0/local/lib/python2.5/site-packages/sage/rings/polynomial/toy_buchberger.py in inter_reduction(Q)
324 Q -- a set of polynomials
325 """
--> 326 base_ring = iter(Q).next().base_ring()
327 Q = set(Q)
328 while True:
<type 'exceptions.StopIteration?'>:
Attachments (1)
Change History (5)
comment:1 Changed 7 years ago by broune
- Summary changed from Ideals in multivariate polynomial rings raise exceptions on comparison to Ideals in multivariate polynomial rings with no variables raise exception on comparison
Changed 6 years ago by broune
comment:2 Changed 6 years ago by broune
- Owner changed from malb to broune
- Status changed from new to assigned
- Summary changed from Ideals in multivariate polynomial rings with no variables raise exception on comparison to [with patch, needs review] Ideals in multivariate polynomial rings with no variables raise exception on comparison
comment:3 Changed 6 years ago by cwitty
- Summary changed from [with patch, needs review] Ideals in multivariate polynomial rings with no variables raise exception on comparison to [with patch, positive review] Ideals in multivariate polynomial rings with no variables raise exception on comparison
comment:4 Changed 6 years ago by mabshoff
- Resolution set to fixed
- Status changed from assigned to closed
Merged in Sage 3.0.2.alpha0
Code looks good, doctests pass in sage/rings/polynomial. Positive review.