Convert a big-endian list of bits, seen as digits in base 2, to their value.
Function:
(defun bebits=>nat (digits) (declare (xargs :guard (bit-listp digits))) (let ((__function__ 'bebits=>nat)) (declare (ignorable __function__)) (bendian=>nat 2 digits)))
Theorem:
(defthm natp-of-bebits=>nat (b* ((nat (bebits=>nat digits))) (natp nat)) :rule-classes :rewrite)
Theorem:
(defthm bebits=>nat-of-bit-list-fix-digits (equal (bebits=>nat (bit-list-fix digits)) (bebits=>nat digits)))
Theorem:
(defthm bebits=>nat-bit-list-equiv-congruence-on-digits (implies (bit-list-equiv digits digits-equiv) (equal (bebits=>nat digits) (bebits=>nat digits-equiv))) :rule-classes :congruence)