         (.put remove [v r]
               (set-of w [w base-set-2,
                          :let [post-w (post-2 w r)]
-                         :when (and (seq post-w) ;i.e. (not (empty? post-w))
-                                    (empty? (intersection (.get sim v) post-w)))]))))
+                         :when (seq post-w) ;i.e. (not (empty? post-w))
+                         :let [sim-v (.get sim v)]
+                         :when (forall [x post-w] (not (contains? sim-v x)))]))))
     (doseq [w base-set-2]
       (.put pre* w
             (set-of [u r] [r R, u (pre-2 w r)])))

        conexp.contrib.dl.framework.semantics
        conexp.contrib.dl.util.graphs)
  (:use clojure.contrib.pprint)
  (:import [java.util HashMap LinkedList]))

(ns-doc
 "Implements description graphs and common operations on them.")

                    (not (contains? sim-u x)))
              (.put remove [u r*]
                    (conj (.get remove [u r*]) w*))
              (.add non-empty-removes [u r*])))))
      (.put remove [v r] #{})
      (.remove non-empty-removes [v r]))
    (HashMap->hash-map sim)))


