 (deftype Constant [c var]
   Object
   (reset [this solver constraint])
-  (val [this solver constraint]
-       1)
   (split-left [this solver constraint]
               false)
   (split-right [this solver constraint])

                key-len
                #js [(contains (iterator tree) (into-array (range key-len)))
                     (contains (iterator tree) (into-array (range key-len)))])
        tree-elems (.elems tree)]
    (dotimes [i (alength tree-elems)]
      (let [elem (aget tree-elems i)]
        (when (number? elem)
          (aset tree-elems i (* elem elem)))))
    (prim= tree-elems (.elems solver))))

(defn self-join-prop [key-len]
  (prop/for-all [min-keys gen/s-pos-int

(defn run-product-join-prop [min-keys key-len updates]
  (let [product-tree (tree min-keys key-len)
        [tree _] (apply-to-tree (tree min-keys key-len) updates)
        keys (.keys tree)
        _ (dotimes [i (alength keys)]
            (dotimes [j (alength keys)]
              (.add product-tree (.concat (aget keys i) (aget keys j)))))
        solver (solver
                (* 2 key-len)
                #js [(contains (iterator tree) (into-array (range 0 key-len)))
                     (contains (iterator tree) (into-array (range key-len (* 2 key-len))))])]
    (prim= (.keys product-tree) (.keys solver))))

(defn product-join-prop [key-len]
  (prop/for-all [min-keys gen/s-pos-int
