anchor.diff:  (defun term*-out (term2)
     (lambda (term1) (term* term1 term2)))
   
  +; Negate the coefficient
   (defun termnegate (term)
     (cons (- (coeff term)) (list (vars term))))
   
  +; Add the powers together
   (defun var* (var1 var2)
     (make-var (sym var1)
               (+ (pwr var1) (pwr var2))))
   
  +; Add terms of the same order
   (defun polyreduce (poly)
     ((tokenreduce term+ equal-order) poly))
   
  +; Multiply variables with the same symbol
   (defun varreduce (variables)
     ((tokenreduce var* equal-sym) variables))
   
  
positive.code:              (filter (equal-fun not (car tokens)) (cdr tokens))))
        nil)))
  
  (defun equal-order (fun term)
    ((equal-token vars) fun term))
  
  (defun equal-sym (fun var)
    ((equal-token sym) fun var))
  
  
negative.code: ; Append the second polynomial to the first
  ; and simplify (i.e. collect like terms)
  (defun poly+ (poly1 poly2)
    (polyreduce (append poly1 poly2)))
  
  ; Negate the second polynomial and add
  (defun poly- (poly1 poly2)
    (polyreduce (append poly1 (polynegate poly2))))
  
  ; Multiply the first polynomial by each term
  ; in the second and add the resulting
  ; polynomials together
  (defun poly* (poly1 poly2)
    (reduce poly+ (termlist* poly1 poly2)))
  
  ; Negate each term
  (defun polynegate (poly)
    (map termnegate poly))
  
  ; Multiply all of the terms in the first
  ; polynomial by each term in the second
  ;
  ; Used when multiplying polynomials together
  (defun termlist* (poly1 poly2)
    (if poly2 (cons (map (term*-out (car poly2)) poly1)
                    (termlist* poly1 (cdr poly2)))
      nil))
  
  ; Append the second variable list to the first
  ; and simplify (i.e. combine variables)
  ;
  ; Used when multiplying terms together
  (defun varlist* (vars1 vars2)
    (varreduce (append vars1 vars2)))
  
  ; Add the coefficients together
  ; and use the same variable list
  ;
  ; Only used with like terms
  (defun term+ (term1 term2)
    (cons (+ (coeff term1) (coeff term2))
          (list (vars term1))))
  
  ; Multiply the coefficients
  ; and the variables together
  (defun term* (term1 term2)
    (cons (* (coeff term1) (coeff term2))
          (list (varlist* (vars term1) (vars term2)))))
  