up previous next
MakeTermOrd

Make a term order matrix from a given matrix

Syntax
MakeTermOrd(M: MAT): MAT
MakeTermOrd(M: MAT, GrDim: INT): MAT

Description
This function returns a (square) matrix of integers defining a term ordering; the output matrix is built from M . The first GrDim rows are left unchanged; if GrDim is not given then it is taken to be 0.

The input matrix M must have rational entries; the first GrDim rows must have non-negative integer entries, and they must be linearly independent.

If M is not square then rows are appended or eliminated as necessary.

NOTE: this function was called CompleteToOrd up to version CoCoA-5.1.2.

Example
/**/  M := matrix([[1,2,3,4]]);
/**/  MakeTermOrd(M);
 [[1, 2, 3, 4],
  [0, 0, 0, -1],
  [0, 0, -1, 0],
  [0, -1, 0, 0]])

/**/  MakeTermOrd(M, LexMat(4));
matrix(ZZ,
 [[1, 2, 3, 4],
  [1, 0, 0, 0],
  [0, 1, 0, 0],
  [0, 0, 1, 0]])

/**/  MakeTermOrd(matrix([[1,2,0,0]]));
 [[1, 2, 0, 0],
  [0, 0, 1, 1],
  [0, 0, 0, -1],
  [0, -1, 0, 0]])

/**/  MakeTermOrd(matrix([[1,2,0,0],[0,0,3,0]]));
matrix(ZZ,
 [[1, 2, 0, 0],
  [0, 0, 3, 0],
  [0, 0, 0, 1],
  [0, -1, 0, 0]])

/**/  MakeTermOrd(matrix([[1,2,0,0],[0,0,3,0]]), RevLexMat(4));
matrix(ZZ,
 [[1, 2, 0, 0],
  [0, 0, 3, 0],
  [0, 0, 0, -1],
  [0, -1, 0, 0]])
--> not a term-ordering

See Also