up previous next
 4.8.9 Custom Term-Orderings
For special purposes, the user can enter a custom ordering. We recall that each ordering > on the set of the terms of a polynomial ring in n variables corresponds to a (not uniquely determined) array (u_1,...,u_s) of vectors of the real vector space R^n. More precisely if a = (a_1, ... ,a_n) and b = (b_1, ... ,b_n) are the n-tuples of the exponents of two terms t and t', then

t > t' <=> (a . u_1, ..., a . u_s) >_{lex} (b . u_1, ..., b . u_s)

where >_{lex} is the ordering on R^s given by: (c_1,...,c_s)>_{lex}(d_1,...,d_s) if and only if the first (leftmost) non-zero coordinate of (c_1-d_1,...,c_s-d_s) is positive.

CoCoA accepts orderings defined by means of n x n matrices of integers. This is not a real restriction if one is interested, for instance, in finding all possible Groebner bases of a given ideal.

Moreover > is a term-ordering if and only if the matrix whose rows are the vectors (u_1,...,u_s) has maximal rank and is such that the first non-zero element in each column is positive.

To compute a Groebner basis a term-ordering is needed.

 Example
 ``` -- The following CoCoA command defines S to be a polynomial ring and -- orders the terms of S using the term-ordering corresponding to the -- vectors (1,1,0,0),(0,-1,0,0),(0,0,1,1),(0,0,0,-1): Use S ::= QQ[x,y,z,t], Ord( Mat([[1, 1, 0, 0], [0,-1, 0, 0], [0, 0, 1, 1], [0, 0, 0,-1]]) ); ```