AUTHORS:
Bases: sage.categories.category_singleton.Category_singleton
The category of constructive euclidean domains, i.e., one can divide producing a quotient and a remainder where the remainder is either zero or its ElementMethods.euclidean_degree() is smaller than the divisor.
EXAMPLES:
sage: EuclideanDomains()
Category of euclidean domains
sage: EuclideanDomains().super_categories()
[Category of principal ideal domains]
TESTS:
sage: TestSuite(EuclideanDomains()).run()
Return the degree of this element as an element of a euclidean
domain, i.e., for elements ,
the euclidean degree
satisfies the usual properties:
Note
The name euclidean_degree was chosen because the euclidean function has different names in different contexts, e.g., absolute value for integers, degree for polynomials.
OUTPUT:
For non-zero elements, a natural number. For the zero element, this might raise an exception or produce some other output, depending on the implementation.
EXAMPLES:
sage: R.<x> = QQ[]
sage: x.euclidean_degree()
1
sage: ZZ.one().euclidean_degree()
1
Return the greatest common divisor of this element and other.
INPUT:
ALGORITHM:
Algorithm 3.2.1 in [Coh1996].
REFERENCES:
[Coh1996] | Henri Cohen. A Course in Computational Algebraic Number Theory. Springer, 1996. |
EXAMPLES:
sage: EuclideanDomains().ElementMethods().gcd(6,4)
2
Return the quotient and remainder of the division of this element by the non-zero element other.
INPUT:
OUTPUT
EXAMPLES:
sage: R.<x> = QQ[]
sage: x.quo_rem(x)
(1, 0)
Return True, since this in an object of the category of Euclidean domains.
EXAMPLES:
sage: Parent(QQ,category=EuclideanDomains()).is_euclidean_domain()
True
EXAMPLES:
sage: EuclideanDomains().super_categories()
[Category of principal ideal domains]