Check whether the logandc2 of two sparseints produces a nonzero value.
(sparseint-test-bitandc2 x y) → test
Function:
(defun sparseint-test-bitandc2$inline (x y) (declare (xargs :guard (and (sparseint-p x) (sparseint-p y)))) (let ((__function__ 'sparseint-test-bitandc2)) (declare (ignorable __function__)) (sparseint-binary-bittest 2 x y)))
Theorem:
(defthm booleanp-of-sparseint-test-bitandc2 (b* ((test (sparseint-test-bitandc2$inline x y))) (booleanp test)) :rule-classes :type-prescription)
Theorem:
(defthm sparseint-test-bitandc2-correct (b* ((?test (sparseint-test-bitandc2$inline x y))) (equal test (not (equal 0 (logandc2 (sparseint-val x) (sparseint-val y)))))))
Theorem:
(defthm sparseint-test-bitandc2$inline-of-sparseint-fix-x (equal (sparseint-test-bitandc2$inline (sparseint-fix x) y) (sparseint-test-bitandc2$inline x y)))
Theorem:
(defthm sparseint-test-bitandc2$inline-sparseint-equiv-congruence-on-x (implies (sparseint-equiv x x-equiv) (equal (sparseint-test-bitandc2$inline x y) (sparseint-test-bitandc2$inline x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm sparseint-test-bitandc2$inline-of-sparseint-fix-y (equal (sparseint-test-bitandc2$inline x (sparseint-fix y)) (sparseint-test-bitandc2$inline x y)))
Theorem:
(defthm sparseint-test-bitandc2$inline-sparseint-equiv-congruence-on-y (implies (sparseint-equiv y y-equiv) (equal (sparseint-test-bitandc2$inline x y) (sparseint-test-bitandc2$inline x y-equiv))) :rule-classes :congruence)