Function:
(defun 4vec->s4vec (x) (declare (xargs :guard (4vec-p x))) (let ((__function__ '4vec->s4vec)) (declare (ignorable __function__)) (if-2vec-p (x) (s2vec (int-to-sparseint (2vec->val x))) (s4vec (int-to-sparseint (4vec->upper x)) (int-to-sparseint (4vec->lower x))))))
Theorem:
(defthm s4vec-p-of-4vec->s4vec (b* ((new-x (4vec->s4vec x))) (s4vec-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm s4vec->4vec-of-4vec->s4vec (b* ((?new-x (4vec->s4vec x))) (equal (s4vec->4vec new-x) (4vec-fix x))))
Theorem:
(defthm 4vec->s4vec-of-4vec-fix-x (equal (4vec->s4vec (4vec-fix x)) (4vec->s4vec x)))
Theorem:
(defthm 4vec->s4vec-4vec-equiv-congruence-on-x (implies (4vec-equiv x x-equiv) (equal (4vec->s4vec x) (4vec->s4vec x-equiv))) :rule-classes :congruence)