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

     #{(make-implication #{1} #{2 3 4})}))

(deftest test-canonical-base-from-clop
  (are [ctx] (and (= (canonical-base ctx)
                     (canonical-base-from-clop (attributes ctx) #(adprime ctx %))))
    contexts/test-ctx-01,
    contexts/test-ctx-04
    contexts/test-ctx-07,
    contexts/test-ctx-08))

(deftest test-intersect-implicational-theories
  (with-testing-data [ctx [contexts/test-ctx-01
                           contexts/test-ctx-04
                           contexts/test-ctx-07
                           contexts/test-ctx-08]
                      n   (range 1 (count (objects ctx)))]
    (= (canonical-base ctx)
       (apply intersect-implicational-theories (attributes ctx)

                           contexts/test-ctx-04,
                           contexts/test-ctx-07,
                           contexts/test-ctx-08]]
    (forall [P (subsets (attributes ctx))]
      (<=> (proper-premise? ctx P)
           (not (empty? (proper-conclusion ctx P)))))))

(deftest test-proper-premises-for-attributes
  (with-testing-data [ctx (random-contexts 10 20),
