| #### D.15.6.1 grobj Procedure from library `gradedModules.lib` (see gradedModules_lib). Usage: grobj(M, w[, d]), matrix/ideal/module M, intvec w, d Return: graded object with matrix presentation M, row weighting w [and total graded degrees d of columns] Purpose: create a valid graded object with a given matrix presentation, weighting [and total graded degrees (in case of zero columns)] Example:
    LIB "gradedModules.lib";
    ring r=32003,(x,y,z),dp;
    def A = grobj( module([x+y, x, 0, 0], [0, x+y, y, 0]), intvec(0,0,0,1) );
    grview(A);
    ==> Graded homomorphism: r^3 + r(-1) <- r(-1)^2, given by a matrix, with degr\
       ees:
    ==>      ..1 ..2 ....
    ==>      --- --- +...
    ==>   0 :  1   - |..1
    ==>   0 :  1   1 |..2
    ==>   0 :  -   1 |..3
    ==>   1 :  -   - |..4
    ==>      === ===
    ==>        1   1
    def F = grobj( module([x,y,0]), intvec(1,1,5) );
    grview(F);
    ==> Graded homomorphism: r(-1)^2 + r(-5) <- r(-2), given by a matrix, with de\
       grees:
    ==>      ..1 ....
    ==>      --- +...
    ==>   1 :  1 |..1
    ==>   1 :  1 |..2
    ==>   5 :  - |..3
    ==>      ===
    ==>        2
    int d = 666; // zero can have any degree...
    def Z = grobj( module([x,0], [0,0,0], [0, y]), intvec(1,2,3), intvec(2, d, 3) );
    grview(Z);
    ==> Graded homomorphism: r(-1) + r(-2) + r(-3) <- r(-2) + r(-666) + r(-3), gi\
       ven by a square matrix, with degrees:
    ==>       ...1 ...2 ...3 .....
    ==>       ---- ---- ---- +....
    ==>    1 :   1    -    - |...1
    ==>    2 :   -    -    1 |...2
    ==>    3 :   -    -    - |...3
    ==>       ==== ==== ====
    ==>          2  666    3
    print(Z);
    ==> x,0,0,
    ==> 0,0,y,
    ==> 0,0,0
    attrib(Z);
    ==> attr:degHomog, type intvec
    ==> attr:isHomog, type intvec
    grrange(Z); // module weights
    ==> 1,2,3
    attrib(Z, "degHomog"); // total degrees
    ==> 2,666,3
    // Zero object:
    matrix z[3][0];  grview( grobj( z, intvec(1,2,3) ) );
    ==> Graded homomorphism: r(-1) + r(-2) + r(-3) <- 0, given by zero (3 x 0) ma\
       trix.
    grview( grobj( freemodule(0), intvec(1,2,3) ) );
    ==> Graded homomorphism: r(-1) + r(-2) + r(-3) <- 0, given by zero (3 x 0) ma\
       trix.
    matrix z1[0][3]; grview( grobj( z1, 0:0, intvec(1,2,3) ) );
    ==> Graded homomorphism: 0 <- r(-1) + r(-2) + r(-3), given by zero (0 x 3) ma\
       trix.
    grview( grobj( freemodule(0), 0:0, intvec(1,2,3) ) );
    ==> Graded homomorphism: 0 <- r(-1) + r(-2) + r(-3), given by zero (0 x 3) ma\
       trix.
    matrix z0[0][0]; grview( grobj( z0, 0:0 ) );
    ==> Graded homomorphism: 0 <- 0, given by zero (0^2) matrix.
    grview( grobj( freemodule(0), 0:0 ) );
    ==> Graded homomorphism: 0 <- 0, given by zero (0^2) matrix.

User manual for Singular version 4.3.2, 2023, generated by texi2html.