IsEuclideanRing( R )
IsEuclideanRing
returns true
if the ring R is a Euclidean ring and
false
otherwise.
A ring R is called a Euclidean ring if it is an integral ring and there exists a function delta, called the Euclidean degree, from R-{0_R} to the nonnegative integers, such that for every pair r in R and s in R-{0_R} there exists an element q such that either r - q s = 0_R or delta(r - q s) < delta( s ). The existence of this division with remainder implies that the Euclidean algorithm can be applied to compute a greatest common divisor of two elements, which in turn implies that R is a unique factorization ring.
gap> IsEuclideanRing( Integers ); true
IsEuclideanRing
first tests whether the flag R.isEuclideanRing
is
bound. If the flag is bound, it returns this value. Otherwise it calls
R.operations.IsEuclideanRing( R )
, remembers the returned value in
R.isEuclideanRing
, and returns it.
The default function called this way is RingOps.IsEuclideanRing
, which
just signals an error, because there is no generic way to test whether a
ring is a Euclidean ring. This function is seldom overlaid because most
rings already have the flag bound.
GAP 3.4.4