Recognize names of function variables.
(funvarp funvar wrld) → yes/no
These are symbols that name declared function variables, i.e. that are in the table of function variables.
Function:
(defun funvarp (funvar wrld) (declare (xargs :guard (plist-worldp wrld))) (let ((__function__ 'funvarp)) (declare (ignorable __function__)) (let ((table (table-alist 'function-variables wrld) )) (and (symbolp funvar) (not (null (assoc-eq funvar table)))))))
Theorem:
(defthm booleanp-of-funvarp (b* ((yes/no (funvarp funvar wrld))) (booleanp yes/no)) :rule-classes :rewrite)