Recognizer for bexp structures.
(bexpp x) → *
Function:
(defun bexpp (x) (declare (xargs :guard t)) (let ((__function__ 'bexpp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :const)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((value (std::da-nth 0 (cdr x)))) (booleanp value)))) ((eq (car x) :equal) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((left (std::da-nth 0 (cdr x))) (right (std::da-nth 1 (cdr x)))) (and (aexpp left) (aexpp right))))) ((eq (car x) :less) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((left (std::da-nth 0 (cdr x))) (right (std::da-nth 1 (cdr x)))) (and (aexpp left) (aexpp right))))) ((eq (car x) :not) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((arg (std::da-nth 0 (cdr x)))) (bexpp arg)))) (t (and (eq (car x) :and) (and (true-listp (cdr x)) (eql (len (cdr x)) 2)) (b* ((left (std::da-nth 0 (cdr x))) (right (std::da-nth 1 (cdr x)))) (and (bexpp left) (bexpp right)))))))))
Theorem:
(defthm consp-when-bexpp (implies (bexpp x) (consp x)) :rule-classes :compound-recognizer)