Ticket #2208 (closed defect: fixed)
[with patch, with positive review] implement is_field for rings of integers
| Reported by: | was | Owned by: | craigcitro |
|---|---|---|---|
| Priority: | major | Milestone: | sage-2.10.3 |
| Component: | number theory | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
sage: R = CyclotomicField(4).ring_of_integers() sage: R.is_field() --------------------------------------------------------------------------- <type 'exceptions.NotImplementedError'> Traceback (most recent call last) /Users/was/build/sage-2.10.2.alpha0/devel/sage-review/sage/modular/<ipython console> in <module>() /Users/was/build/sage-2.10.2.alpha0/devel/sage-review/sage/modular/ring.pyx in sage.rings.ring.IntegralDomain.is_field() /Users/was/build/sage-2.10.2.alpha0/devel/sage-review/sage/modular/ring.pyx in sage.rings.ring.Ring.is_finite() <type 'exceptions.NotImplementedError'>:
Also
sage: R = NumberField(x^3 + 2, 'a').ring_of_integers() sage: R.is_field() --------------------------------------------------------------------------- <type 'exceptions.NotImplementedError'> Traceback (most recent call last) /Users/was/build/sage-2.10.2.alpha0/devel/sage-review/sage/modular/<ipython console> in <module>() /Users/was/build/sage-2.10.2.alpha0/devel/sage-review/sage/modular/ring.pyx in sage.rings.ring.IntegralDomain.is_field() /Users/was/build/sage-2.10.2.alpha0/devel/sage-review/sage/modular/ring.pyx in sage.rings.ring.Ring.is_finite() <type 'exceptions.NotImplementedError'>:
Attachments
Change History
comment:1 Changed 5 years ago by craigcitro
- Owner changed from was to craigcitro
- Status changed from new to assigned
- Summary changed from implement is_field for rings of integers to [with patch, needs very quick review] implement is_field for rings of integers
comment:2 Changed 5 years ago by was
I would delete "This exists for compatibility purposes." from the docstring. It really says nothing useful and if we're going to write that we could write that sort of thing all over the place.
comment:3 Changed 5 years ago by craigcitro
New patch posted, removes the questionable verbiage. Adds another doctest.
Note: See
TracTickets for help on using
tickets.


Made the obvious fix, both the examples above now work (though there are different doctests).