Recognizer for char-literal structures.
(char-literalp x) → *
Function:
(defun char-literalp (x) (declare (xargs :guard t)) (let ((__function__ 'char-literalp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :char)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (unicode-charlit-char-p get)))) (t (and (eq (car x) :escape) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((get (std::da-nth 0 (cdr x)))) (escape-sequence-p get))))))))
Theorem:
(defthm consp-when-char-literalp (implies (char-literalp x) (consp x)) :rule-classes :compound-recognizer)