              (impl 2 3 ==> 4)
              (impl 1 2 4 ==> 0 3)}))))
 
-(deftest test-stem-base-with-minimal-support-constraints
-  (with-testing-data [ctx stem-base-test-contexts
+(deftest test-canonical-base-with-minimal-support-constraints
+  (with-testing-data [ctx canonical-base-test-contexts
                       mis [0 1/5 1/3 1/2 4/5 1]]
     (= (set (filter #(<= mis (support % ctx))
                     (canonical-base ctx)))

             (impl 1 2 4 ==> 0 3)}))))

(deftest test-intersect-implicational-theories
  (with-testing-data [ctx stem-base-test-contexts,
                      n   (range 1 (count (objects ctx)))]
    (= (set (canonical-base ctx))
       (set (apply intersect-implicational-theories (attributes ctx)

(deftest test-pseudo-intents
  (with-testing-data [ctx (random-contexts 10 20)]
    (= (set (pseudo-intents ctx))
       (set (map premise (canonical-base ctx)))))
  (is (empty? (pseudo-intents (adiag-context [0 1 2 3]))))
  (is (empty? (pseudo-intents (adiag-context [nil true adiag-context])))))

