Recognizer for string-element structures.
(string-elementp x) → *
Function:
(defun string-elementp (x) (declare (xargs :guard t)) (let ((__function__ 'string-elementp)) (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)))) (characterp 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)))) (escapep get))))))))
Theorem:
(defthm consp-when-string-elementp (implies (string-elementp x) (consp x)) :rule-classes :compound-recognizer)