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