up previous next
CompleteToOrd

completes a matrix to an ordering matrix

Syntax
CompleteToOrd(M: MAT): MAT
CompleteToOrd(M1, M2: MAT): MAT

Description
This function returns an ordering matrix (i.e. with non-zero determinant) completing the first matrix. Given two matrices M1 and M2, it just concatenates of M1 and M2 and makes it square removing the redundant rows. Given only one matrix M it completes M to an ordering matrix; if M is suitable the resulting matrix defines a term-ordering.

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

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

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

/**/  CompleteToOrd(matrix([[1,2,0,0],[0,0,3,0]]));
matrix(QQ,
 [[1, 2, 0, 0],
  [0, 0, 3, 0],
  [0, 0, 0, 1],
  [0, -1, 0, 0]])

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

See Also