Recognizer for function-header structures.
(function-headerp x) → *
Function:
(defun function-headerp (x) (declare (xargs :guard t)) (let ((__function__ 'function-headerp)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(name inputs outputs))) :exec (fty::alist-with-carsp x '(name inputs outputs))) (b* ((name (cdr (std::da-nth 0 x))) (inputs (cdr (std::da-nth 1 x))) (outputs (cdr (std::da-nth 2 x)))) (and (identifierp name) (typed-variable-listp inputs) (typed-variable-listp outputs))))))
Theorem:
(defthm consp-when-function-headerp (implies (function-headerp x) (consp x)) :rule-classes :compound-recognizer)