Opened 4 years ago
Closed 4 years ago
#22910 closed defect (fixed)
Polynomial ring when is_field is NotImplemented
Reported by:  bruno  Owned by:  

Priority:  major  Milestone:  sage8.0 
Component:  commutative algebra  Keywords:  polynomial ring, ring extension 
Cc:  Merged in:  
Authors:  Bruno Grenet  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  d4bc6c8 (Commits, GitHub, GitLab)  Commit:  d4bc6c8ce967ffcc4c55ca1952248c0fd9656e58 
Dependencies:  Stopgaps: 
Description (last modified by )
To build a polynomial ring over some ring R
, SageMath calls R.is_field()
. If this method raises an exception NotImplementedError
, the polynomial ring cannot be built. An example of the behavior was given on Ask:
sage: p = 5 sage: F = GF(p) sage: R1.<x> = F['x'] sage: F1.<alpha1> = F.extension(x^p  x  1) sage: R2.<x> = F1['x'] sage: F2.<alpha2> = F1.extension(x^p  x  alpha1^(p1)) sage: R3.<x> = F2['x'] sage: F3.<alpha3> = F2.extension(x^p  x  (alpha1*alpha2)^(p1)) sage: R4.<x> = F3['x'] Traceback (most recent call last): ... NotImplementedError:
The purpose of the current ticket is to catch this exception to act as if R
was known not to be a field.
Resolution
The resolution consists in modifying the method is_field
for polynomial quotient rings to make it return False
instead of raising a NotImplementedError
when the flag proof
is set to False
. This is consistent with the method for (generic) quotient rings.
Change History (11)
comment:1 Changed 4 years ago by
 Branch set to u/bruno/polynomial_ring_when_is_field_is_notimplemented
comment:2 Changed 4 years ago by
 Commit set to 9c853e72dd6252e90f5532fb767f1ab6ea5003e9
 Description modified (diff)
 Status changed from new to needs_review
comment:3 Changed 4 years ago by
 Status changed from needs_review to needs_work
comment:4 Changed 4 years ago by
 Commit changed from 9c853e72dd6252e90f5532fb767f1ab6ea5003e9 to aafb6c828b5d4e54ef2d65d4684d8f1e6f449ddd
comment:5 Changed 4 years ago by
 Status changed from needs_work to needs_review
comment:6 Changed 4 years ago by
 Reviewers set to Travis Scrimshaw
Minor docstring fixed:
If proof is ``True``, requires the ``is_irreducible`` method of the modulus to
and ``is_field``
. Otherwise LGTM.
comment:7 Changed 4 years ago by
 Commit changed from aafb6c828b5d4e54ef2d65d4684d8f1e6f449ddd to d4bc6c8ce967ffcc4c55ca1952248c0fd9656e58
Branch pushed to git repo; I updated commit sha1. New commits:
d4bc6c8  22910: Docstring fixes

comment:8 Changed 4 years ago by
I fixed the docstrings you mention, as well as another one with the same problem (one ` instead of two).
comment:10 Changed 4 years ago by
Thanks for the review!
comment:11 Changed 4 years ago by
 Branch changed from u/bruno/polynomial_ring_when_is_field_is_notimplemented to d4bc6c8ce967ffcc4c55ca1952248c0fd9656e58
 Resolution set to fixed
 Status changed from positive_review to closed
Branch pushed to git repo; I updated commit sha1. New commits:
22910: Forward flag proof to is_field in is_integral_domain
22910: add possibility for is_field to get flags