Recognizer for booleans
See generalized-booleans for a discussion of a potential soundness problem for ACL2 related to the question: Which Common Lisp functions are known to return Boolean values?
Function:
(defun booleanp (x) (declare (xargs :guard t)) (if (eq x t) t (eq x nil)))