# Singular

#### D.15.20.19 grres

Procedure from library `gradedModules.lib` (see gradedModules_lib).

Usage:
grres(M, l[, b]), graded object M, int l, int b

Return:

Purpose:
compute graded resolution of M (of length l) and minimise it if b was given

Example:
 ```LIB "gradedModules.lib"; ring r=32003,(x,y,z),dp; module A = grobj( module([x+y, x, 0, 3], [0, x+y, y, 2], [y, y, z, 1]), intvec(0,0,0,1) ); grview(A); ==> Graded homomorphism: r^3 + r(-1) <- r(-1)^3, given by a matrix, with degr\ ees: ==> ..1 ..2 ..3 .... ==> --- --- --- +... ==> 0 : 1 - 1 |..1 ==> 0 : 1 1 1 |..2 ==> 0 : - 1 1 |..3 ==> 1 : 0 0 0 |..4 ==> === === === ==> 1 1 1 module B = grgroebner(A); grview(B); ==> Graded homomorphism: r^3 + r(-1) <- r(-1)^3 + r(-2) + r(-3), given by a m\ atrix, with degrees: ==> ..1 ..2 ..3 ..4 ..5 .... ==> --- --- --- --- --- +... ==> 0 : 1 1 1 2 - |..1 ==> 0 : 1 - 1 - - |..2 ==> 0 : 1 1 1 2 3 |..3 ==> 1 : 0 0 0 1 2 |..4 ==> === === === === === ==> 1 1 1 2 3 "graded resolution of B: "; def C = grres(B, 0); grview(C); ==> graded resolution of B: ==> Graded resolution: ==> r^3 + r(-1) <-- d_1 -- ==> r(-1) + r(-2) + r(-1)^2 + r(-3) <-- d_2 -- ==> r(-3) + r(-2) <-- d_3 -- ==> 0, given by maps: ==> d_1 : ==> Graded homomorphism: r^3 + r(-1) <- r(-1) + r(-2) + r(-1)^2 + r(-3), give\ n by a matrix, with degrees: ==> ..1 ..2 ..3 ..4 ..5 .... ==> --- --- --- --- --- +... ==> 0 : 1 2 1 1 - |..1 ==> 0 : - - 1 1 - |..2 ==> 0 : 1 2 1 1 3 |..3 ==> 1 : 0 1 0 0 2 |..4 ==> === === === === === ==> 1 2 1 1 3 ==> d_2 : ==> Graded homomorphism: r(-1) + r(-2) + r(-1)^2 + r(-3) <- r(-3) + r(-2), gi\ ven by a matrix, with degrees: ==> ..1 ..2 .... ==> --- --- +... ==> 1 : 2 1 |..1 ==> 2 : 1 0 |..2 ==> 1 : - 1 |..3 ==> 1 : - 1 |..4 ==> 3 : 0 - |..5 ==> === === ==> 3 2 ==> d_3 : ==> Graded homomorphism: r(-3) + r(-2) <- 0, given by zero (2 x 0) matrix. int i; int l = size(C); "D^2 == 0: "; for (i = 1; i < l; i++ ) { i; grview( grprod(C[i], C[i+1]) ); } ==> D^2 == 0: ==> 1 ==> Graded homomorphism: r^3 + r(-1) <- r(-3) + r(-2), given by zero (4 x 2) \ matrix. ==> 2 ==> Graded homomorphism: r(-1) + r(-2) + r(-1)^2 + r(-3) <- 0, given by zero \ (5 x 0) matrix. ```