up previous next
 4.8.5 Weights Modifier
In forming a ring, one of the possible modifiers that may be added has one of the forms:

(i) Weights(W_1,...,W_n) where W_i is a positive integer specifying the weight of the i-th indeterminate (the number of weights listed must be equal to the number of indeterminates)

(ii) Weights(M) where M is a matrix with as many columns as there are indeterminates. In the latter case, the i-th indeterminate has the multi-degree given by the i-th column of M.

NB: Because of a choice in the early design (oriented to single gradings), the first row of the matrix M must have all positive entries. CoCoA-5, with a cleaner mathematical foundation, will not have this limitation.

If the weights are not specified the default value is 1 for all indeterminates.

 Example
 ``` Use S ::= QQ[a,b,c], Weights(1,2,3); Deg(b); 2 ------------------------------- L := [1,2,3]; Use S ::= QQ[a,b,c], Weights(L); Deg(b); 2 ------------------------------- W := Mat([[1,2,3],[4,5,6]]); Use S ::= QQ[a,b,c], Weights(W); Deg(b); 2 ------------------------------- MDeg(b); -- the multi-degree of b [2, 5] ------------------------------- Deg(b^3+a^2c); 6 ------------------------------- MDeg(b^3+a^2c); [6, 15] ------------------------------- WeightsMatrix(); Mat([ [1, 2, 3], [4, 5, 6] ]) ------------------------------- WeightsList(); -- returns the first row of the Weights Matrix [1, 2, 3] ------------------------------- ```