|
D.15.5.2 grtest
Procedure from library gradedModules.lib (see gradedModules_lib).
- Usage:
- grtest(M[,b]), anything M, optionally int b
- Return:
- 1 if M is a valid graded object, 0 otherwise
- Purpose:
- validate a graded object. Print an invalid object message if b is not given
- Note:
- M should be an ideal or module or matrix, with weighting attribute
'isHomog' and optionally total graded degrees attribute 'degHomog'.
Attributes should be compatible with the presentation matrix.
Example:
| LIB "gradedModules.lib";
ring r=32003,(x,y,z),dp;
// the following calls will fail due to tests in grtest:
grobj( module([x+y, x, 0, 0], [0, x+y, y, 0]), intvec(0,0,0,0) ); // enough row weights
==> _[1]=x*gen(2)+x*gen(1)+y*gen(1)
==> _[2]=x*gen(2)+y*gen(3)+y*gen(2)
// grobj( module([x+y, x, 0, 0], [0, x+y, y, 0]), intvec(0,0) ); // not enough row weights
// grobj( module([x,0], [0,0,0], [0, y]), intvec(1,2,3) ); // zero column needs (otherwise optional) total degrees
grobj( module([x,0], [0,0,0], [0, y]), intvec(1,2,3), intvec(2, 10, 3) ); // compatible total degrees (on non-zero columns)
==> _[1]=x*gen(1)
==> _[2]=0
==> _[3]=y*gen(2)
// grobj( module([x,0], [0,0,0], [0, y]), intvec(1,2,3), intvec(2-1, 10, 3+1) ); // incompatible total degrees (on both non-zero columns)
|
|