Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/categories/euclidean_domains.py
4108 views
1
r"""
2
Euclidean domains
3
"""
4
#*****************************************************************************
5
# Copyright (C) 2008 Teresa Gomez-Diaz (CNRS) <[email protected]>
6
#
7
# Distributed under the terms of the GNU General Public License (GPL)
8
# http://www.gnu.org/licenses/
9
#******************************************************************************
10
11
from sage.categories.category import Category
12
from sage.categories.category_singleton import Category_singleton
13
from sage.categories.principal_ideal_domains import PrincipalIdealDomains
14
from sage.misc.cachefunc import cached_method
15
16
class EuclideanDomains(Category_singleton):
17
"""
18
The category of euclidean domains
19
constructive euclidean domain, i.e. one can divide producing a quotient and a
20
remainder where the remainder is either zero or is "smaller" than the divisor
21
22
EXAMPLES::
23
24
sage: EuclideanDomains()
25
Category of euclidean domains
26
sage: EuclideanDomains().super_categories()
27
[Category of principal ideal domains]
28
29
TESTS::
30
31
sage: TestSuite(EuclideanDomains()).run()
32
"""
33
34
def super_categories(self):
35
"""
36
EXAMPLES::
37
38
sage: EuclideanDomains().super_categories()
39
[Category of principal ideal domains]
40
"""
41
return [PrincipalIdealDomains()]
42
43
class ParentMethods:
44
def is_euclidean_domain(self):
45
"""
46
Return True, since this in an object of the category of Euclidean domains.
47
48
EXAMPLES::
49
50
sage: Parent(QQ,category=EuclideanDomains()).is_euclidean_domain()
51
True
52
53
"""
54
return True
55
56
class ElementMethods:
57
pass
58
59