This is an ordinary defenum.
Function:
(defun axi-op-p (x) (declare (xargs :guard t)) (or (eq x 'and) (eq x 'xor)))
Theorem: type-when-axi-op-p
(defthm type-when-axi-op-p (implies (axi-op-p x) (if (symbolp x) (if (not (equal x 't)) (not (equal x 'nil)) 'nil) 'nil)) :rule-classes :compound-recognizer)