# Module ring

This module provides ring elements. The module realizes a base
class for the classes represented by the module ordered from this
module and the module variable and the module polynom from the
package groebner. Common factors in polynomial fractions are
determined and cancelled in the module fraction from the package
groebner.

Examples:

?- reduced(2*X^2-3, R, F).

R is 1+1/2-X^2,

F is – 2

?- quorem(X^2-2*Y^2,X-Y,Q,R).

Q is 2*X+2*Y,

R is -X^2

The new denominator is given in reduced form. We expose here the computation by the predicate reduced/3. The common factor is determined via a Gröbner Basis algorithm. The algorithm itself makes use of multivariate polynomial division among other computations. We expose here the former computation by the predicate quorem/4.

Our Gröbner Basis algorithm uses monomial lexical ordering. In this ordering the head of a polynomial is not necessary the monomial with the greatest degree. The predicates hipow/3 and degree/2 allow accessing characteristics of a polynomial. Random polynomials over a given set of variables can be generated by the predicate randpoly/2.

The following ring element predicates are defined:

**reduced(A, R, F):**

- The predicate succeeds with reduced R and factor F of A.
**quorem(A, B, Q, R):**- The predicate succeeds with quotient Q and remainder R of A divided by B.
**hipow(P, D):**- The predicate succeeds in D with the maximum degree of P in the variable X.

**degree(P, D):**- The predicate succeeds in D with the maximum monomial degree of P.
**randpoly(L, P):**- The predicate succeeds in P with a random polynomial over the variables L.

## Kommentare