Path: blob/master/sage/categories/euclidean_domains.py
4108 views
r"""1Euclidean domains2"""3#*****************************************************************************4# Copyright (C) 2008 Teresa Gomez-Diaz (CNRS) <[email protected]>5#6# Distributed under the terms of the GNU General Public License (GPL)7# http://www.gnu.org/licenses/8#******************************************************************************910from sage.categories.category import Category11from sage.categories.category_singleton import Category_singleton12from sage.categories.principal_ideal_domains import PrincipalIdealDomains13from sage.misc.cachefunc import cached_method1415class EuclideanDomains(Category_singleton):16"""17The category of euclidean domains18constructive euclidean domain, i.e. one can divide producing a quotient and a19remainder where the remainder is either zero or is "smaller" than the divisor2021EXAMPLES::2223sage: EuclideanDomains()24Category of euclidean domains25sage: EuclideanDomains().super_categories()26[Category of principal ideal domains]2728TESTS::2930sage: TestSuite(EuclideanDomains()).run()31"""3233def super_categories(self):34"""35EXAMPLES::3637sage: EuclideanDomains().super_categories()38[Category of principal ideal domains]39"""40return [PrincipalIdealDomains()]4142class ParentMethods:43def is_euclidean_domain(self):44"""45Return True, since this in an object of the category of Euclidean domains.4647EXAMPLES::4849sage: Parent(QQ,category=EuclideanDomains()).is_euclidean_domain()50True5152"""53return True5455class ElementMethods:56pass575859