Recognizer for function structures.
(functionp x) → *
Function:
(defun functionp (x) (declare (xargs :guard t)) (let ((__function__ 'functionp)) (declare (ignorable __function__)) (and (true-listp x) (eql (len x) 3) (b* ((name (std::da-nth 0 x)) (params (std::da-nth 1 x)) (body (std::da-nth 2 x))) (and (symbol-valuep name) (symbol-value-listp params) (ttermp body))))))
Theorem:
(defthm consp-when-functionp (implies (functionp x) (consp x)) :rule-classes :compound-recognizer)