Function:
(defun s3vec-fix (x) (declare (xargs :guard (s4vec-p x))) (let ((__function__ 's3vec-fix)) (declare (ignorable __function__)) (b* (((s4vec x))) (if (s3vec-p x) (s4vec-fix x) (s4vec (sparseint-bitor x.upper x.lower) (sparseint-bitand x.upper x.lower))))))
Theorem:
(defthm s4vec-p-of-s3vec-fix (b* ((fix (s3vec-fix x))) (s4vec-p fix)) :rule-classes :rewrite)
Theorem:
(defthm s3vec-fix-correct (b* ((acl2::?fix (s3vec-fix x))) (equal (s4vec->4vec fix) (3vec-fix (s4vec->4vec x)))))
Theorem:
(defthm s3vec-fix-of-s4vec-fix-x (equal (s3vec-fix (s4vec-fix x)) (s3vec-fix x)))
Theorem:
(defthm s3vec-fix-s4vec-equiv-congruence-on-x (implies (s4vec-equiv x x-equiv) (equal (s3vec-fix x) (s3vec-fix x-equiv))) :rule-classes :congruence)