Bitwise wired OR resolution of two 4vecs.
Resolves together two 4vecs as if they were both assigned to a
Function:
(defun 4vec-resor (a b) (declare (xargs :guard (and (4vec-p a) (4vec-p b)))) (let ((__function__ '4vec-resor)) (declare (ignorable __function__)) (b* (((4vec a)) ((4vec b))) (4vec (logior a.upper b.upper) (logior (logand a.upper a.lower) (logand b.upper b.lower) (logand a.lower b.lower))))))
Theorem:
(defthm 4vec-p-of-4vec-resor (b* ((ans (4vec-resor a b))) (4vec-p ans)) :rule-classes :rewrite)
Main correctness theorem: each result bit just the ACL2::4v-wor of the corresponding input bits.
Theorem:
(defthm 4vec-resor-bits (equal (4vec-idx->4v n (4vec-resor x y)) (acl2::4v-wor (4vec-idx->4v n x) (4vec-idx->4v n y))))
Theorem:
(defthm 4vec-resor-of-4vec-fix-a (equal (4vec-resor (4vec-fix a) b) (4vec-resor a b)))
Theorem:
(defthm 4vec-resor-4vec-equiv-congruence-on-a (implies (4vec-equiv a a-equiv) (equal (4vec-resor a b) (4vec-resor a-equiv b))) :rule-classes :congruence)
Theorem:
(defthm 4vec-resor-of-4vec-fix-b (equal (4vec-resor a (4vec-fix b)) (4vec-resor a b)))
Theorem:
(defthm 4vec-resor-4vec-equiv-congruence-on-b (implies (4vec-equiv b b-equiv) (equal (4vec-resor a b) (4vec-resor a b-equiv))) :rule-classes :congruence)