(vl-echar-digit-value x radix) interprets the extended character
(vl-echar-digit-value x radix) → *
Function:
(defun vl-echar-digit-value (x radix) (declare (xargs :guard (and (vl-echar-p x) (natp radix)))) (declare (xargs :guard (and (<= 2 radix) (<= radix 36)))) (let ((__function__ 'vl-echar-digit-value)) (declare (ignorable __function__)) (digit-char-p (vl-echar->char x) (lnfix radix))))
Theorem:
(defthm natp-of-vl-echar-digit-value (let ((ret (vl-echar-digit-value x radix))) (implies ret (and (natp ret) (integerp ret) (<= 0 ret)))) :rule-classes ((:rewrite) (:type-prescription :corollary (or (not (vl-echar-digit-value x radix)) (and (integerp (vl-echar-digit-value x radix)) (<= 0 (vl-echar-digit-value x radix)))))))
Theorem:
(defthm vl-echar-digit-value-of-vl-echar-fix-x (equal (vl-echar-digit-value (vl-echar-fix x) radix) (vl-echar-digit-value x radix)))
Theorem:
(defthm vl-echar-digit-value-vl-echar-raw-equiv-congruence-on-x (implies (vl-echar-raw-equiv x x-equiv) (equal (vl-echar-digit-value x radix) (vl-echar-digit-value x-equiv radix))) :rule-classes :congruence)
Theorem:
(defthm vl-echar-digit-value-of-nfix-radix (equal (vl-echar-digit-value x (nfix radix)) (vl-echar-digit-value x radix)))
Theorem:
(defthm vl-echar-digit-value-nat-equiv-congruence-on-radix (implies (acl2::nat-equiv radix radix-equiv) (equal (vl-echar-digit-value x radix) (vl-echar-digit-value x radix-equiv))) :rule-classes :congruence)