Coerces a oct-digit-char-list*p into a natural number.
(oct-digit-chars-value x) → value
For instance,
Function:
(defun oct-digit-chars-value$inline (x) (declare (xargs :guard (oct-digit-char-list*p x))) (let ((acl2::__function__ 'oct-digit-chars-value)) (declare (ignorable acl2::__function__)) (mbe :logic (if (consp x) (+ (ash (oct-digit-char-value (car x)) (* 3 (1- (len x)))) (oct-digit-chars-value (cdr x))) 0) :exec (oct-digit-chars-value1 x 0))))
Theorem:
(defthm natp-of-oct-digit-chars-value (b* ((value (oct-digit-chars-value$inline x))) (natp value)) :rule-classes :type-prescription)
Theorem:
(defthm icharlisteqv-implies-equal-oct-digit-chars-value-1 (implies (icharlisteqv x x-equiv) (equal (oct-digit-chars-value x) (oct-digit-chars-value x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm unsigned-byte-p-of-oct-digit-chars-value (unsigned-byte-p (* 3 (len x)) (oct-digit-chars-value x)))
Theorem:
(defthm oct-digit-chars-value-upper-bound (< (oct-digit-chars-value x) (expt 2 (* 3 (len x)))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm oct-digit-chars-value-upper-bound-free (implies (equal n (len x)) (< (oct-digit-chars-value x) (expt 2 (* 3 n)))))
Theorem:
(defthm oct-digit-chars-value1-removal (implies (natp val) (equal (oct-digit-chars-value1 x val) (+ (oct-digit-chars-value x) (ash (nfix val) (* 3 (len x)))))))
Theorem:
(defthm oct-digit-chars-value-of-append (equal (oct-digit-chars-value (append x (list a))) (+ (ash (oct-digit-chars-value x) 3) (oct-digit-char-value a))))