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