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