up previous next
IsOne

test whether an object is one

Syntax
IsOne(X: OBJECT): BOOL

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

Example
/**/  IsOne(23);
false
/**/  IsOne(3/3);
true
/**/  Use R ::= QQ[x,y,z];
/**/  IsOne(1);
false
/**/  IsOne(ideal(x^2, x^2-1));
false

See Also