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