Recognizer for s-char structures.
(s-char-p x) → *
Function:
(defun s-char-p (x) (declare (xargs :guard t)) (let ((__function__ 's-char-p)) (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* ((unwrap (std::da-nth 0 (cdr x)))) (natp unwrap)))) (t (and (eq (car x) :escape) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((unwrap (std::da-nth 0 (cdr x)))) (escapep unwrap))))))))
Theorem:
(defthm consp-when-s-char-p (implies (s-char-p x) (consp x)) :rule-classes :compound-recognizer)