Apply a binary bitwise operation (represented as a 4-bit truth table) to two sparseints.
(sparseint-binary-bitop op x y) → binary-res
Function:
(defun sparseint-binary-bitop$inline (op x y) (declare (type (unsigned-byte 4) op)) (declare (xargs :guard (and (integerp op) (sparseint-p x) (sparseint-p y)))) (let ((__function__ 'sparseint-binary-bitop)) (declare (ignorable __function__)) (sparseint$-binary-bitop op (sparseint-fix x) (sparseint-fix y))))
Theorem:
(defthm sparseint-p-of-sparseint-binary-bitop (b* ((binary-res (sparseint-binary-bitop$inline op x y))) (sparseint-p binary-res)) :rule-classes :rewrite)
Theorem:
(defthm sparseint-val-of-sparseint-binary-bitop (b* ((?binary-res (sparseint-binary-bitop$inline op x y))) (equal (sparseint-val binary-res) (binary-bitop op (sparseint-val x) (sparseint-val y)))))
Theorem:
(defthm sparseint-binary-bitop$inline-of-ifix-op (equal (sparseint-binary-bitop$inline (ifix op) x y) (sparseint-binary-bitop$inline op x y)))
Theorem:
(defthm sparseint-binary-bitop$inline-int-equiv-congruence-on-op (implies (int-equiv op op-equiv) (equal (sparseint-binary-bitop$inline op x y) (sparseint-binary-bitop$inline op-equiv x y))) :rule-classes :congruence)
Theorem:
(defthm sparseint-binary-bitop$inline-of-sparseint-fix-x (equal (sparseint-binary-bitop$inline op (sparseint-fix x) y) (sparseint-binary-bitop$inline op x y)))
Theorem:
(defthm sparseint-binary-bitop$inline-sparseint-equiv-congruence-on-x (implies (sparseint-equiv x x-equiv) (equal (sparseint-binary-bitop$inline op x y) (sparseint-binary-bitop$inline op x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm sparseint-binary-bitop$inline-of-sparseint-fix-y (equal (sparseint-binary-bitop$inline op x (sparseint-fix y)) (sparseint-binary-bitop$inline op x y)))
Theorem:
(defthm sparseint-binary-bitop$inline-sparseint-equiv-congruence-on-y (implies (sparseint-equiv y y-equiv) (equal (sparseint-binary-bitop$inline op x y) (sparseint-binary-bitop$inline op x y-equiv))) :rule-classes :congruence)