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