(vl-bitlist->offset x) → offset
Function:
(defun vl-bitlist->offset (x) (declare (xargs :guard (vl-bitlist-p x))) (let ((__function__ 'vl-bitlist->offset)) (declare (ignorable __function__)) (if (atom x) 0 (acl2::logcons (case (vl-bit-fix (car x)) ((:vl-1val :vl-zval) 0) (t 1)) (vl-bitlist->offset (cdr x))))))
Theorem:
(defthm natp-of-vl-bitlist->offset (b* ((offset (vl-bitlist->offset x))) (natp offset)) :rule-classes :type-prescription)
Theorem:
(defthm vl-bitlist->offset-of-vl-bitlist-fix-x (equal (vl-bitlist->offset (vl-bitlist-fix x)) (vl-bitlist->offset x)))
Theorem:
(defthm vl-bitlist->offset-vl-bitlist-equiv-congruence-on-x (implies (vl-bitlist-equiv x x-equiv) (equal (vl-bitlist->offset x) (vl-bitlist->offset x-equiv))) :rule-classes :congruence)