Recognizer for sandwich structures.
(sandwich-p x) → *
Function:
(defun sandwich-p (x) (declare (xargs :guard t)) (let ((acl2::__function__ 'sandwich-p)) (declare (ignorable acl2::__function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(bread fillings))) :exec (fty::alist-with-carsp x '(bread fillings))) (b* ((bread (cdr (std::da-nth 0 x))) (fillings (cdr (std::da-nth 1 x)))) (and (integerp bread) (symbolp fillings))))))
Theorem:
(defthm consp-when-sandwich-p (implies (sandwich-p x) (consp x)) :rule-classes :compound-recognizer)