Function:
(defun s4vec-wildeq-safe (a b) (declare (xargs :guard (and (s4vec-p a) (s4vec-p b)))) (let ((__function__ 's4vec-wildeq-safe)) (declare (ignorable __function__)) (b* ((eq (s3vec-bitnot (s4vec-bitxor a b))) ((s4vec b)) (zmask (sparseint-bitandc1 b.upper b.lower))) (s3vec-reduction-and (s3vec-bitor eq (s2vec zmask))))))
Theorem:
(defthm s4vec-p-of-s4vec-wildeq-safe (b* ((res (s4vec-wildeq-safe a b))) (s4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm s4vec-wildeq-safe-correct (b* ((?res (s4vec-wildeq-safe a b))) (equal (s4vec->4vec res) (4vec-wildeq-safe (s4vec->4vec a) (s4vec->4vec b)))))
Theorem:
(defthm s4vec-wildeq-safe-of-s4vec-fix-a (equal (s4vec-wildeq-safe (s4vec-fix a) b) (s4vec-wildeq-safe a b)))
Theorem:
(defthm s4vec-wildeq-safe-s4vec-equiv-congruence-on-a (implies (s4vec-equiv a a-equiv) (equal (s4vec-wildeq-safe a b) (s4vec-wildeq-safe a-equiv b))) :rule-classes :congruence)
Theorem:
(defthm s4vec-wildeq-safe-of-s4vec-fix-b (equal (s4vec-wildeq-safe a (s4vec-fix b)) (s4vec-wildeq-safe a b)))
Theorem:
(defthm s4vec-wildeq-safe-s4vec-equiv-congruence-on-b (implies (s4vec-equiv b b-equiv) (equal (s4vec-wildeq-safe a b) (s4vec-wildeq-safe a b-equiv))) :rule-classes :congruence)