Bitwise equality of 3vecs.
Assuming that the inputs have no Z bits, we return, following the boolean-convention:
This properly treats X as an unknown, i.e., whether or not an X bit is equal to anything else, including another X bit, is always unknown.
Function:
(defun 3vec-== (x y) (declare (xargs :guard (and (4vec-p x) (4vec-p y)))) (let ((__function__ '3vec-==)) (declare (ignorable __function__)) (3vec-reduction-and (3vec-bitnot (3vec-bitxor x y)))))
Theorem:
(defthm 4vec-p-of-3vec-== (b* ((equal (3vec-== x y))) (4vec-p equal)) :rule-classes :rewrite)
Theorem:
(defthm 3vec-==-of-4vec-fix-x (equal (3vec-== (4vec-fix x) y) (3vec-== x y)))
Theorem:
(defthm 3vec-==-4vec-equiv-congruence-on-x (implies (4vec-equiv x x-equiv) (equal (3vec-== x y) (3vec-== x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm 3vec-==-of-4vec-fix-y (equal (3vec-== x (4vec-fix y)) (3vec-== x y)))
Theorem:
(defthm 3vec-==-4vec-equiv-congruence-on-y (implies (4vec-equiv y y-equiv) (equal (3vec-== x y) (3vec-== x y-equiv))) :rule-classes :congruence)