anchor.diff: -;;; Resolution-based Q&A system.
  +;;; Resolution Refutation in Common Lisp.
   ;;;
   ;;; Pranav Ravichandran <me@onloop.net>
   
  +;;; Variables.
   (defstruct
     (var
       (:constructor var (x))) x)
   
  +;;; Facts.
   (defstruct
     (fact
       (:constructor deffact (func &rest params)))
     func params)
   
  +;;; Rules.
   (defstruct
     (rule
       (:constructor defrule (facts
  
positive.code:                         (if negate
                            (cnf-wff (defwff 'not (list goal)))
                            goal)))
    (progn (format t "Resolvent: ~a~%~%" goal-negation)
    (if (and (wff-p goal-negation) (not (wff-wffs goal-negation)))
      ans
      (loop for wff in (append facts rules)
  
negative.code:            (pairlis ewff-1 ewff-2))))
  
  (defun get-substitutions (ewff-1 ewff-2)
    "Get substitutions in a wff transformation."
    (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)))
  