Determine if a character is an upper-case letter (A-Z).
(up-alpha-p x) → bool
ACL2 has a built-in alternative to this function, common-lisp::upper-case-p, but it is irritating to use because it has standard-char-p guards. In contrast,
(defun up-alpha-p$inline (x) (declare (type character x)) (let ((acl2::__function__ 'up-alpha-p)) (declare (ignorable acl2::__function__)) (b* (((the (unsigned-byte 8) code) (char-code x))) (and (<= (big-a) code) (<= code (big-z))))))
(defthm chareqv-implies-equal-up-alpha-p-1 (implies (chareqv x x-equiv) (equal (up-alpha-p x) (up-alpha-p x-equiv))) :rule-classes (:congruence))
(defthm upper-case-p-is-up-alpha-p (equal (common-lisp::upper-case-p x) (up-alpha-p (double-rewrite x))))