#9549 closed defect (duplicate)
InfinitePolynomialRing_sparse.is_field lacks `proof=...` option
Reported by: | mmezzarobba | Owned by: | malb |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | commutative algebra | Keywords: | |
Cc: | Merged in: | ||
Authors: | Marc Mezzarobba | Reviewers: | Mike Hansen |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
The class InfinitePolynomialRing_sparse
defines two methods called is_field()
. The second definition rejects keyword arguments. This prevents from creating polynomial rings over infinite polynomial rings:
$ ./sage ---------------------------------------------------------------------- | Sage Version 4.5, Release Date: 2010-07-16 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: InfinitePolynomialRing(QQ, 'a')['x'] --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/marc/opt/sage-4.5/<ipython console> in <module>() /home/marc/opt/sage-4.5/local/lib/python2.6/site-packages/sage/rings/ring.so in sage.rings.ring.Ring.__getitem__ (sage/rings/ring.c:2550)() /home/marc/opt/sage-4.5/local/lib/python2.6/site-packages/sage/rings/polynomial/polynomial_ring_constructor.pyc in PolynomialRing(base_ring, arg1, arg2, sparse, order, names, name, implementation) 341 raise TypeError, "if second arguments is a string with no commas, then there must be no other non-optional arguments" 342 name = arg1 --> 343 R = _single_variate(base_ring, name, sparse, implementation) 344 else: 345 # 2-4. PolynomialRing(base_ring, names, order='degrevlex'): /home/marc/opt/sage-4.5/local/lib/python2.6/site-packages/sage/rings/polynomial/polynomial_ring_constructor.pyc in _single_variate(base_ring, name, sparse, implementation) 420 R = m.PolynomialRing_dense_padic_ring_fixed_mod(base_ring, name) 421 --> 422 elif base_ring.is_field(proof = False): 423 R = m.PolynomialRing_field(base_ring, name, sparse, implementation=implementation) 424 TypeError: is_field() got an unexpected keyword argument 'proof'
There is a similar issue with is_integral_domain
, too.
Attachments (1)
Change History (8)
comment:1 follow-up: ↓ 2 Changed 11 years ago by
comment:2 in reply to: ↑ 1 Changed 11 years ago by
- Status changed from new to needs_review
Replying to mmezzarobba:
Please disregard (or better, delete) the previous attachment.
I have now replaced it with the correct file. (It seems that for some reason, unprivilegied trac users are allowed to replace attached files but not to delete them??!)
comment:3 follow-up: ↓ 4 Changed 11 years ago by
- Reviewers set to Mike Hansen
- Status changed from needs_review to needs_work
You probably don't want the line
print "coucou"
in the patch.
Changed 11 years ago by
comment:4 in reply to: ↑ 3 Changed 11 years ago by
- Status changed from needs_work to needs_review
Replying to mhansen:
You probably don't want the line
print "coucou"in the patch.
Sorry--I was sure I had double-checked that it wasn't in the patch after uploading it... :-/ Thanks for spotting my blunder.
comment:5 Changed 11 years ago by
- Status changed from needs_review to needs_work
In is_integral_domain, we should pass on the keywords to self._base.is_integral_domain() so that that can take a proof option.
comment:6 Changed 10 years ago by
- Resolution set to duplicate
- Status changed from needs_work to closed
This has been fixed by #9443.
comment:7 Changed 10 years ago by
- Milestone changed from sage-4.6.1 to sage-duplicate/invalid/wontfix
Please disregard (or better, delete) the previous attachment.