We use Ring ^ ZZ to make a new free module.
i1 : R = ZZ/101[x,y,z]; |
i2 : M = R^4 |
Such modules are often made as a side effect when creating matrices, to serve as the source and target of the corresponding homomorphism.
When the ring is graded, so are its free modules. By default, the degrees of the basis elements are taken to be 0.
i3 : degrees M |
We can use Ring ^ {...} to specify other degrees, or more precisely, their additive inverses.
i4 : F = R^{1,4:2,3,3:4} |
i5 : degrees F |
Notice the use of : above to indicate repetition.
If the variables of the ring have multi-degrees represented by lists (vectors) of integers, as described in multi-graded polynomial rings, then the degrees of a free module must also be multi-degrees.
i6 : S = ZZ[a,b,c, Degrees=>{{1,2},{2,0},{3,3}}] |
i7 : N = S ^ {{-1,-1},{-4,4},{0,0}} |
i8 : degree N_0 |
i9 : degree (a*b*N_1) |