anchor.diff:    operator wffs)
   
   (defun cnf-rule (facts-wff implications-wff)
  -  (cnf-wff (defwff 'or (list (demorgan (defwff 'not facts-wff))
  -                             (demorgan implications-wff)))))
  +  (cnf-wff (defwff 'or (list (cnf-wff (defwff 'not (list facts-wff)))
  +                             (cnf-wff implications-wff)))))
   
   (defun cnf-wff (wff)
  -  (let ((dwff (demorgan wff)))
  +  (let ((dwff (flatten (demorgan wff))))
       (cond
         ((fact-p dwff) dwff)
         ((equal (wff-operator dwff) 'or)
  
positive.code:            (defwff operator (mapcar #'(lambda (x) (demorgan x)) operand)))
            ('else wff))))
  
  (defun resolve (facts rules goal &aux
                        (goal-negation (cnf-wff (defwff 'not (list goal))))
                        (ans-literal (deffact 'ans (goal-vars goal))))
    ())
  
negative.code:       ((equal (wff-operator dwff) 'not) dwff))))
  
  (defun fequal (ewff-1 ewff-2)
    (if (= (length ewff-1) (length ewff-2))
      (every #'(lambda (pair)
                 (if (typep (car pair) 'list)
                   (fequal (car pair) (cdr pair))
                   (or (equal (car pair) (cdr pair))
                       (or (var-p (car pair)) (var-p (cdr pair))))))
             (pairlis ewff-1 ewff-2))))
  
  (defun get-substitutions (ewff-1 ewff-2)
    (let* ((resolved (set-difference ewff-1 ewff-2 :test 'equal))
           (resolved-wff (remove-if-not #'(lambda (x) (equal (car x) 'not)) resolved))
           (resolved-fact (remove-if #'(lambda (x) (equal (car x) 'not)) resolved)))
      (if (> (length resolved) 0)
        (get-substitutions-helper (car resolved-wff) (list 'not (car resolved-fact))))))
  
  (defun get-substitutions-helper (ewff-1 ewff-2)
    (if (= (length ewff-1) (length ewff-2))
      (remove nil
              (mapcar #'(lambda (pair)
                          (if (typep (car pair) 'list)
                            (get-substitutions-helper (car pair) (cdr pair))
                            (if
                              (or (var-p (car pair)) (var-p (cdr pair)))
                              (if (var-p (car pair)) (cdr pair) (car pair)))))
                      (pairlis ewff-1 ewff-2)))))
  
  (defun isnegation (wff-1 wff-2)
    (cond ((and (fact-p wff-1) (wff-p wff-2))
  