Recognizer for func structures.
(func-p x) → *
Function:
(defun func-p (x) (declare (xargs :guard t)) (let ((acl2::__function__ 'func-p)) (declare (ignorable acl2::__function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(name formals guard returns more-returns expansion-depth flattened-formals flattened-returns))) :exec (fty::alist-with-carsp x '(name formals guard returns more-returns expansion-depth flattened-formals flattened-returns))) (b* ((name (cdr (std::da-nth 0 x))) (formals (cdr (std::da-nth 1 x))) (guard (cdr (std::da-nth 2 x))) (returns (cdr (std::da-nth 3 x))) (more-returns (cdr (std::da-nth 4 x))) (expansion-depth (cdr (std::da-nth 5 x))) (flattened-formals (cdr (std::da-nth 6 x))) (flattened-returns (cdr (std::da-nth 7 x)))) (and (symbolp name) (decl-listp formals) (hint-pair-p guard) (decl-listp returns) (hint-pair-listp more-returns) (natp expansion-depth) (symbol-listp flattened-formals) (symbol-listp flattened-returns))))))
Theorem:
(defthm consp-when-func-p (implies (func-p x) (consp x)) :rule-classes :compound-recognizer)