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