
(* DIP Termorder Optimization Definition Module. *)

DEFINITION MODULE DIPTOO;


FROM MASSTOR IMPORT LIST;


PROCEDURE DIPDEM(A: LIST): LIST;
(*Distributive polynomial degree matrix. A is a distributive
polynomial. B is the degree matrix of A. *)


PROCEDURE DIPDEV(A: LIST): LIST;
(*Distributive polynomial degree vector. A is a distributive
polynomial. N is the degree vector of A.*)


PROCEDURE DIPLDM(A: LIST): LIST;
(*Distributive polynomial list degree matrix. A is a list of
distributive polynomials. B is the sum of all degree matrices
of each element of A. *)


PROCEDURE DIPTRM(A: LIST): LIST;
(*Distributive polynomial terms. A is a distributive polynomial
in r variables. T is a list of beta-integers each counting
the terms in the respective variable.*)


PROCEDURE DIPTYP(A: LIST): LIST;
(*Distributive polynomial typ. A is a distributive polynomial
in r variables. t is a rational number, t is the typ of A,
0 lt t le 1. *)


PROCEDURE DIPVOP(P,V: LIST; VAR PP,VP: LIST);
(*Distributive polynomial variable ordering optimisation.
P and PP are lists of distributive polynomials.
V and VP are variable lists. The optimal variable ordering
for the polynomials in P is determined. The variables
of the polynomials in P are permuted to produce PP.
VP is the new variable list.*)


PROCEDURE DMEVAD(A,E: LIST): LIST;
(*Degree matrix exponent vector add. A is a degree matrix.
E is an exponent vector. B=A + E. *)
 

PROCEDURE HDIFDI(A: LIST; VAR B,FL: LIST);
(*Homogeneous distributive polynomial from distributive polynomial.
A is a distributive polynomial in r variables. s=r+1.
If A is allready homogeneous then f=0 else f=1.
B(xs,x1, ...,xr)=(xs)**(tdeg(A)) * A(x1/xs, ...,xr/xs). *)
 

PROCEDURE LBLXCO(U,V: LIST): LIST;
(*List of beta integers lexicographical compare.
U=(u1, ...,ur), V=(v1, ...vs) are lists of beta integers.
t=0 if U eq V. t=1 if U gt V. t=-1 if U lt V. eq, gt,
lt with respect to the lexicographical ordering of the
beta integers. *)


PROCEDURE PTERM(RL,A: LIST): LIST;
(*Polynomial terms. A is a recursive polynomial in r
variables. T is a list of beta-integers each counting the
terms in the respective variable.*)


PROCEDURE PTYP(RL,A: LIST): LIST;
(*Polynomial typ. A is a recursive polynomial in r variables.
t is a rational number, t is the PTYP of A, 0 lt t lt 1. *)


PROCEDURE PVDEMA(A: LIST): LIST;
(*Permutation vector for degree matrix. A is a degree matrix.
P is a permutation vector. *)


END DIPTOO.


