Bitwise logical OR of 4vecs.
Function:
(defun 4vec-bitor (x y) (declare (xargs :guard (and (4vec-p x) (4vec-p y)))) (let ((__function__ '4vec-bitor)) (declare (ignorable __function__)) (3vec-bitor (3vec-fix x) (3vec-fix y))))
Theorem:
(defthm 3vec-p!-of-4vec-bitor (b* ((x-or-y (4vec-bitor x y))) (3vec-p! x-or-y)) :rule-classes :rewrite)
Main correctness theorem: each result bit is just the ACL2::4v-or of the corresponding input bits.
Theorem:
(defthm 4vec-bitor-bits (equal (4vec-idx->4v n (4vec-bitor x y)) (acl2::4v-or (4vec-idx->4v n x) (4vec-idx->4v n y))))
Theorem:
(defthm 4vec-bitor-of-3vec-fix-x (equal (4vec-bitor (3vec-fix x) y) (4vec-bitor x y)))
Theorem:
(defthm 4vec-bitor-3vec-equiv-congruence-on-x (implies (3vec-equiv x x-equiv) (equal (4vec-bitor x y) (4vec-bitor x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm 4vec-bitor-of-3vec-fix-y (equal (4vec-bitor x (3vec-fix y)) (4vec-bitor x y)))
Theorem:
(defthm 4vec-bitor-3vec-equiv-congruence-on-y (implies (3vec-equiv y y-equiv) (equal (4vec-bitor x y) (4vec-bitor x y-equiv))) :rule-classes :congruence)