From ca050d3e16b852b5eb814cdebc866b526b1c25ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20R=C3=BCth?= Date: Wed, 30 Nov 2016 13:28:02 -0500 Subject: [PATCH] Refine quotient ring category to Fields() when it is isomorphic to a field --- src/sage/rings/polynomial/polynomial_quotient_ring.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/polynomial_quotient_ring.py b/src/sage/rings/polynomial/polynomial_quotient_ring.py index 0e0c3e3c8aa..2d21cd7f92b 100644 --- a/src/sage/rings/polynomial/polynomial_quotient_ring.py +++ b/src/sage/rings/polynomial/polynomial_quotient_ring.py @@ -813,7 +813,11 @@ def is_field(self, proof = True): sage: S.is_field() True """ - return self.base_ring().is_field(proof) and self.modulus().is_irreducible() + ret = self.base_ring().is_field(proof) and self.modulus().is_irreducible() + if ret: + from sage.categories.all import Fields + self._refine_category_(Fields()) + return ret def krull_dimension(self): return self.base_ring().krull_dimension()