Recognizer for ascii.
(asciip x) → yes/no
Function:
(defun asciip (x) (declare (xargs :guard t)) (mbe :logic (unsigned-byte-p 7 x) :exec (and (integerp x) (<= 0 x) (< x 128))))
Theorem:
(defthm booleanp-of-asciip (b* ((yes/no (asciip x))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm asciip-forward-unsigned-byte-p (implies (asciip x) (unsigned-byte-p 7 x)) :rule-classes :forward-chaining)
Theorem:
(defthm unsigned-byte-p-rewrite-asciip (equal (unsigned-byte-p 7 x) (asciip x)))
Theorem:
(defthm natp-when-asciip (implies (asciip x) (natp x)) :rule-classes :compound-recognizer)