The ring elements appearing in v should be be in R, or in a base ring of R.
In the first form, each list in v gives a row of the matrix. The length of the list v should be the number of generators of M, and the length of each element of v (which is itself a list of ring elements) should be the number of generators of the source module N.
i1 : R = ZZ/101[x,y,z]; |
i2 : p = map(R^2,3,{{x^2,0,3},{0,y^2,5}}) o2 = | x2 0 3 | | 0 y2 5 | 2 3 o2 : Matrix R <--- R |
i3 : isHomogeneous p o3 = true |
i4 : p = map(R^2,3,{(0,0) => x+y, (1,1) => x^2, (0,2) => x-1, (0,0) => x-y}) o4 = | x-y 0 x-1 | | 0 x2 0 | 2 3 o4 : Matrix R <--- R |