From ae8cfa3610b600b0d7f27f27599aca5cb86cdd44 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Tue, 16 Aug 2022 14:54:57 +0900 Subject: [PATCH] Make is_integral_domain() always take a proof keyword arugment. --- src/sage/categories/integral_domains.py | 15 +++++++++++---- src/sage/rings/tate_algebra.py | 13 +++++++++++-- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/sage/categories/integral_domains.py b/src/sage/categories/integral_domains.py index 9daa68ff25e..8cf87ffe94f 100644 --- a/src/sage/categories/integral_domains.py +++ b/src/sage/categories/integral_domains.py @@ -96,17 +96,23 @@ def _contains_helper(cls): return Category_contains_method_by_parent_class(cls()) class ParentMethods: - def is_integral_domain(self): - """ - Return True, since this in an object of the category of integral domains. + def is_integral_domain(self, proof=True): + r""" + Return ``True``, since this in an object of the category + of integral domains. EXAMPLES:: sage: QQ.is_integral_domain() True - sage: Parent(QQ,category=IntegralDomains()).is_integral_domain() + sage: Parent(QQ, category=IntegralDomains()).is_integral_domain() True + sage: L. = LazyLaurentSeriesRing(QQ) + sage: L.is_integral_domain() + True + sage: L.is_integral_domain(proof=True) + True """ return True @@ -138,3 +144,4 @@ def _test_fraction_field(self, **options): class ElementMethods: pass + diff --git a/src/sage/rings/tate_algebra.py b/src/sage/rings/tate_algebra.py index fd0147eaf88..9097b2a4e07 100644 --- a/src/sage/rings/tate_algebra.py +++ b/src/sage/rings/tate_algebra.py @@ -1275,8 +1275,8 @@ def random_element(self, degree=2, terms=5, integral=False, prec=None): gens = [ self.element_class(self, g) for g in self._integer_ring._gens ] return self.element_class(self, polring.random_element(degree, terms)(*gens), prec) - def is_integral_domain(self): - """ + def is_integral_domain(self, proof=True): + r""" Return ``True`` since any Tate algebra is an integral domain. EXAMPLES:: @@ -1285,5 +1285,14 @@ def is_integral_domain(self): sage: A.is_integral_domain() True + TESTS: + + Check that :trac:`34372` is fixed:: + + sage: A. = TateAlgebra(Zp(3)) + sage: R. = PolynomialRing(A) + sage: R.is_integral_domain(proof=True) + True """ return True +