Recognizer for aexp structures.
(aexpp x) → *
Function:
(defun aexpp (x) (declare (xargs :guard t)) (let ((__function__ 'aexpp)) (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)))) (integerp value)))) ((eq (car x) :var) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((name (std::da-nth 0 (cdr x)))) (stringp name)))) ((eq (car x) :add) (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))))) (t (and (eq (car x) :mul) (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)))))))))
Theorem:
(defthm consp-when-aexpp (implies (aexpp x) (consp x)) :rule-classes :compound-recognizer)