Convert a (pure constant) signed bvec into an integer.
(v2i v) → *
Function:
(defun v2i (v) (declare (xargs :guard (true-listp v))) (let ((__function__ 'v2i)) (declare (ignorable __function__)) (mbe :logic (if (s-endp v) (bool->sign (car v)) (logcons (bool->bit (car v)) (v2i (scdr v)))) :exec (if (atom v) 0 (if (atom (cdr v)) (if (car v) -1 0) (logcons (bool->bit (car v)) (v2i (cdr v))))))))
Theorem:
(defthm v2i-of-bfr-eval-list (equal (v2i (bfr-eval-list x env)) (bfr-list->s x env)))
Theorem:
(defthm v2i-of-i2v (equal (v2i (i2v x)) (ifix x)))