Recognizer for function-definer structures.
(function-definerp x) → *
Function:
(defun function-definerp (x) (declare (xargs :guard t)) (let ((__function__ 'function-definerp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :regular)) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((body (std::da-nth 0 (cdr x))) (measure (std::da-nth 1 (cdr x)))) (and (expressionp body) (maybe-expressionp measure))))) (t (and (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)))))))))
Theorem:
(defthm consp-when-function-definerp (implies (function-definerp x) (consp x)) :rule-classes :compound-recognizer)