up previous next
GradingMat

matrix of generalized weights for indeterminates

Syntax
WeightsMatrix(R: RING): MAT

Description
This function returns the grading matrix (or weights matrix) for the polynomials ring R .

Example
/**/  OrdM := MakeTermOrd(RowMat([2,3]));  OrdM;
matrix(ZZ,
 [[2, 3],
  [0, -1]])
/**/  P := NewPolyRing(QQ, "x,y", OrdM, 1);  -- GradingDim = 1
/**/  GradingMat(P);
matrix(ZZ,
 [[2, 3]])

/**/  Use P;
/**/  deg(x*y);
2
/**/  wdeg(x*y);
[5]

See Also