Recognizer for function-specifier structures.
(function-specifierp x) → *
Function:
(defun function-specifierp (x) (declare (xargs :guard t)) (let ((__function__ 'function-specifierp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :regular)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((body (std::da-nth 0 (cdr x)))) (expressionp body)))) ((eq (car x) :quantified) (and (true-listp (cdr x)) (eql (len (cdr x)) 3) (b* ((quantifier (std::da-nth 0 (cdr x))) (variables (std::da-nth 1 (cdr x))) (matrix (std::da-nth 2 (cdr x)))) (and (quantifierp quantifier) (typed-variable-listp variables) (expressionp matrix))))) (t (and (eq (car x) :input-output) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((relation (std::da-nth 0 (cdr x)))) (expressionp relation))))))))
Theorem:
(defthm consp-when-function-specifierp (implies (function-specifierp x) (consp x)) :rule-classes :compound-recognizer)