up previous next
IsZero

test whether an object is zero

Syntax
IsZero(X: OBJECT): BOOL

Description
This function tests whether its argument is zero; the argument can be of almost any type for which zero makes sense.

Example
/**/  IsZero(23);
false
/**/  IsZero(3-3);
true
/**/  use R ::= QQ[x,y,z];
/**/  IsZero(x^2+3*y-1);
false
/**/  IsZero(ideal(x^2,x*y^3));
false
/**/  F := NewFreeModule(R, 3);
/**/  zero(F);
[0, 0, 0]
/**/  IsZero(zero(F));
true
/**/  IsZero(matrix([[0,0,0], [0,0,0]]));
true

See Also