Check if a named logic-mode function is defined.
(definedp fn wrld) → yes/no
We check if the function symbol has an
The built-in program-mode functions are defined
but do not have an
See definedp+ for an enhanced variant of this utility.
Function:
(defun definedp (fn wrld) (declare (xargs :guard (and (symbolp fn) (plist-worldp wrld)))) (let ((__function__ 'definedp)) (declare (ignorable __function__)) (if (getpropc fn 'unnormalized-body nil wrld) t nil)))
Theorem:
(defthm booleanp-of-definedp (b* ((yes/no (definedp fn wrld))) (booleanp yes/no)) :rule-classes :rewrite)