- Usage:
`wtgrev=weightGrevlex(wtR)`

- Inputs:
`wtR`, a weight matrix

- Outputs:
`wtgrev`, a matrix, weight-over-grevlex matrix

i1 : wtR = matrix{{5,6,6},{3,6,0}}; 2 3 o1 : Matrix ZZ <--- ZZ |

i2 : weightGrevlex(wtR) o2 = | 5 6 6 | | 3 6 0 | | 1 0 0 | 3 3 o2 : Matrix ZZ <--- ZZ |

It is standard in other algebra systems to have a weighted monomial ordering based on one row of weights such as matrix{{5,6,6}} being extended to matrix{{5,6,6},{1,1,0},{1,0,0}}, whereas M2 would extend it to matrix{{5,6,6},{1,1,1},{1,1,0}}. The method here allows for more than one independent row of weights matrix{{5,6,6},{3,6,0}} to be extended to matrix{{5,6,6},{3,6,0},{1,0,0}}. Note that the number of rows necessairly matches the number of (free) variables, those of P, since the rightmost square submatrix defines a monomial ordering on P.

- weightGrevlex(Matrix)