1 | \begin{lisp:documentation}{ring}{STRUCTURE}{+ $-$ * / gcd lcm zerop unit length signum numerator denominator }
|
---|
2 | The structure whose slots are bound to functions
|
---|
3 | performing usual ring operations. In addition to usual arithmetical
|
---|
4 | operations, bindings for other common operations
|
---|
5 | which increase efficiency of Grobner basis calculations are also
|
---|
6 | included. They are as follows:
|
---|
7 | GCD $-$ greatest common divisor;
|
---|
8 | LCM $-$ least common multiple;
|
---|
9 | ZEROP $-$ test whether an element is zero;
|
---|
10 | SIGNUM $-$ the sign of a ring element (+1, $-$1 or zero);
|
---|
11 | UNIT $-$ the unit of the ring;
|
---|
12 | NUMERATOR $-$ the numerator, if a ring of fractions
|
---|
13 | DENOMINATOR $-$ the denominator, if a ring of fractions
|
---|
14 | LENGTH $-$ an integer giving the approximate length
|
---|
15 | of the representation; for example, for integers
|
---|
16 | its default binding is \#'integer$-$length;
|
---|
17 | \end{lisp:documentation}
|
---|
18 |
|
---|
19 | \begin{lisp:documentation}{*ring$-$of$-$integers*}{VARIABLE}{(make$-$ring :+ \#'+ :$-$ \#'$-$ :* \#'* :/ \#'floor :gcd \#'gcd :lcm \#'lcm :zerop \#'zerop :signum \#'signum :unit 1 :length \#'integer$-$length
|
---|
20 | :numerator \#'numerator :denominator \#'denominator) }
|
---|
21 | Operations in the ring of integers.
|
---|
22 | \end{lisp:documentation}
|
---|
23 |
|
---|
24 | \begin{lisp:documentation}{*field$-$of$-$rationals*}{VARIABLE}{(make$-$ring :+ \#'+ :$-$ \#'$-$ :* \#'* :/ \#'/ :gcd \#'(lambda (\&rest r) (declare (ignore r)) 1) :lcm \#'(lambda (\&rest r) (apply \#'* r)) :zerop
|
---|
25 | \#'zerop :signum \#'signum :unit 1 :length \#'(lambda (x) (+ (integer$-$length (numerator x)) (integer$-$length (denominator x)))) :numerator
|
---|
26 | \#'numerator :denominator \#'denominator) }
|
---|
27 | Operations on the field of rational numbers.
|
---|
28 | \end{lisp:documentation}
|
---|
29 |
|
---|
30 | \begin{lisp:documentation}{field$-$modulo$-$prime}{FUNCTION}{modulus }
|
---|
31 | Return a RING structure with operations bound
|
---|
32 | to the arithmetical operations modulo MODULUS, which
|
---|
33 | should be a prime.
|
---|
34 | \end{lisp:documentation}
|
---|
35 |
|
---|
36 | \begin{lisp:documentation}{*coefficient$-$ring*}{VARIABLE}{*ring$-$of$-$integers* }
|
---|
37 | The default RING structure, used in most operations
|
---|
38 | on the coefficients of polynomials. It should be carefully
|
---|
39 | set if rings other than the default ring is used.
|
---|
40 | \end{lisp:documentation}
|
---|
41 |
|
---|