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