up previous next
IsPositiveGrading

check if a matrix defines a positive grading

Syntax
IsPositiveGrading(M: MAT): BOOL
IsPositiveGrading(M: MAT,N: INT): BOOL

Description
This function determines whether a matrix defines a positive grading, i.e. each column has a non-zero entry and its first non-zero entry is positive.

NOTE: it also requires it has maximal rank (from version CoCoA-5.1.3).

Example
/**/  IsPositiveGrading(LexMat(5));
true
/**/  IsPositiveGrading(submat(LexMat(5),1..3,1..5)); --only the first 3 rows
false
/**/  IsPositiveGrading(mat([[0,2,3], [1, -1, 0]]));
true
/**/  IsPositiveGrading(mat([[1,1], [0,-1]]));
true
/**/  IsPositiveGrading(mat([[1,1], [0,-1], [-1, 0]])); --not maximal rank
false

See Also