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