\begin{lisp:documentation}{ring}{STRUCTURE}{+ $-$ * / gcd lcm zerop unit length signum numerator denominator }
The structure whose slots are bound to functions
performing usual ring operations. In addition to usual arithmetical
operations, bindings for other common operations
which increase efficiency of Grobner basis calculations are also
included. They are as follows:
	GCD	$-$ greatest common divisor;
	LCM	$-$ least common multiple;
	ZEROP	$-$ test whether an element is zero;
	SIGNUM  $-$ the sign of a ring element (+1, $-$1 or zero);
	UNIT	$-$ the unit of the ring;
	NUMERATOR $-$ the numerator, if a ring of fractions
	DENOMINATOR $-$ the denominator, if a ring of fractions
	LENGTH  $-$ an integer giving the approximate length
		of the representation; for example, for integers
		its default binding is \#'integer$-$length;
\end{lisp:documentation}

\begin{lisp:documentation}{*ring$-$of$-$integers*}{VARIABLE}{(make$-$ring :+ \#'+ :$-$ \#'$-$ :* \#'* :/ \#'floor :gcd \#'gcd :lcm \#'lcm :zerop \#'zerop :signum \#'signum :unit 1 :length \#'integer$-$length
                                                              :numerator \#'numerator :denominator \#'denominator) }
Operations in the ring of integers.
\end{lisp:documentation}

\begin{lisp:documentation}{*field$-$of$-$rationals*}{VARIABLE}{(make$-$ring :+ \#'+ :$-$ \#'$-$ :* \#'* :/ \#'/ :gcd \#'(lambda (\&rest r) (declare (ignore r)) 1) :lcm \#'(lambda (\&rest r) (apply \#'* r)) :zerop
                                                                \#'zerop :signum \#'signum :unit 1 :length \#'(lambda (x) (+ (integer$-$length (numerator x)) (integer$-$length (denominator x)))) :numerator
                                                                \#'numerator :denominator \#'denominator) }
Operations on the field of rational numbers.
\end{lisp:documentation}

\begin{lisp:documentation}{field$-$modulo$-$prime}{FUNCTION}{modulus }
Return a RING structure with operations bound
to the arithmetical operations modulo MODULUS, which
should be a prime.
\end{lisp:documentation}

\begin{lisp:documentation}{*coefficient$-$ring*}{VARIABLE}{*ring$-$of$-$integers* }
The default RING structure, used in most operations
on the coefficients of polynomials. It should be carefully
set if rings other than the default ring is used.
\end{lisp:documentation}

