Here is my implementation of
=zero? for polynomials:
;; inside the polynomial package define (=zero-poly? poly) (cond ((empty-termlist? (term-list poly)) true) ((=zero? (coeff (first-term (term-list poly)))) (=zero-poly? (make-poly (variable poly) (rest-terms (term-list poly))))) (else false))) (put '=zero? '(polynomial) (lambda (poly) (=zero-poly? poly)))
Now we can test it:
Our procedure understand that: \(0x5+x4+(0+0i)x3+(0y3+0y)x^2=0\)\ As we can see our implementation is extremely powerful!