Predicates

The functions in this section test various properties of sparse matrices.

A eq B : MtrxSprs, MtrxSprs -> BoolElt
Given sparse matrices A and B, return true if and only if A and B are equal.
IsZero(A) : MtrxSprs -> BoolElt
Given an m x n sparse matrix A over the ring R, return true iff A is the m x n zero sparse matrix.

IsOne(A) : MtrxSprs -> BoolElt
Given a square m x m sparse matrix A over the ring R, return true iff A is the m x m identity sparse matrix.

IsMinusOne(A) : MtrxSprs -> BoolElt
Given a square m x m sparse matrix A over the ring R, return true iff A is the negation of the m x m identity sparse matrix.
IsScalar(A) : MtrxSprs -> BoolElt
Given a square m x m sparse matrix A over the ring R, return true iff A is scalar, i.e., iff A is the product of some element of R and the m x m identity sparse matrix.
IsDiagonal(A) : MtrxSprs -> BoolElt
Given a square sparse matrix A over the ring R, return true iff A is diagonal, i.e., iff the only non-zero entries of A are on the diagonal.
IsSymmetric(A) : MtrxSprs -> BoolElt
Given a square sparse matrix A over the ring R, return true iff A is symmetric, i.e., iff A equals its transpose.
IsUpperTriangular(A) : MtrxSprs -> BoolElt
Given a sparse matrix A over the ring R, return true iff A is upper triangular, i.e., iff the only non-zero entries of A are on or above the diagonal.
IsLowerTriangular(A) : MtrxSprs -> BoolElt
Given a sparse matrix A over the ring R, return true iff A is lower triangular, i.e., iff the only non-zero entries of A are on or below the diagonal.
V2.28, 13 July 2023