Recognize digits 0-9.
Function:
(defun number-char-p (x) (declare (xargs :guard t)) (and (characterp x) (str::dec-digit-char-p x)))
Theorem:
(defthm booleanp-of-number-char-p (booleanp (number-char-p x)) :rule-classes :type-prescription)
Theorem:
(defthm characterp-when-number-char-p (implies (number-char-p x) (characterp x)) :rule-classes :compound-recognizer)