It is possible to set up a polynomial ring so that the degree of an element is a vector of integers. For this, the option Degrees is used, together with a list of degrees for the variables in the ring. Each degree is itself a list of integers. The degrees given must all be of the same length, and length zero is allowed, to get an ungraded ring.
i1 : R = ZZ/101[a,b,c,Degrees=>{{1,2},{2,1},{1,0}}] |
i2 : describe R |
At the moment there is a restriction on the degree vectors: the first entry must be greater than zero. This restriction will be removed soon.
i3 : degree a |
i4 : degree b^2 |
i5 : degree 0_R |
i6 : degree 1_R |
A random element of bi-degree {m,n} can be obtained with random.
i7 : random({15,15},R) |
The function degree applied to a polynomial will return the least upper bound of the degrees of its monomials.
i8 : degree (a+b) |
We may recover the number of integers in each degree list for our ring as follows.
i9 : degreeLength R |
i10 : degreeLength ZZ |