Test for a freealg object's being zero
freealg
is.zero(x)
Object of class freealg
Function is.zero() returns TRUE if x is indeed the zero free algebra object. It is defined as length(coeffs(x))==0 for reasons of efficiency, but conceptually it returns x==constant(0).
is.zero()
TRUE
x
length(coeffs(x))==0
x==constant(0)
(Use constant(0) to create the zero object).
constant(0)
constant
# NOT RUN { stopifnot(is.zero(constant(0))) # }
Run the code above in your browser using DataLab