Recognizer for char-val structures.
(char-val-p x) → *
Function:
(defun char-val-p (x) (declare (xargs :guard t)) (let ((__function__ 'char-val-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :sensitive)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (common-lisp::stringp get)))) (t (and (eq (car x) :insensitive) (and (true-listp (cdr x)) (eql (len (cdr x)) 2)) (b* ((iprefix (std::da-nth 0 (cdr x))) (get (std::da-nth 1 (cdr x)))) (and (booleanp iprefix) (common-lisp::stringp get)))))))))
Theorem:
(defthm consp-when-char-val-p (implies (char-val-p x) (consp x)) :rule-classes :compound-recognizer)