The function basis can be used to produce bases (over the ground field) of parts of modules (and rings) of a specified degree.
i1 : R = ZZ/101[a..c]; |
i2 : basis(2, R) |
i3 : M = ideal(a,b,c)/ideal(a^2,b^2,c^2); |
i4 : f = basis(2,M) |
Notice that the matrix of f is expressed in terms of the generators of M. The reason is that M is the target of f, and matrices such as f are always expressed in terms of the generators of the source and target.
i5 : target f |
The command super is useful for getting around this.
i6 : super f |
When a ring is multi-graded, we specify the degree as a list of integers.
i7 : S = ZZ/101[x,y,z,Degrees=>{{1,3},{1,4},{1,-1}}]; |
i8 : basis({7,24}, S) |