Enhanced variant of guard-verified-p.
(guard-verified-p+ fn/thm wrld) → yes/no
This returns the same result as guard-verified-p, but it causes an error if called on a symbol that does not name a function or theorem.
Function:
(defun guard-verified-p+ (fn/thm wrld) (declare (xargs :guard (and (symbolp fn/thm) (plist-worldp wrld)))) (let ((__function__ 'guard-verified-p+)) (declare (ignorable __function__)) (if (and (not (function-symbolp fn/thm wrld)) (not (theorem-symbolp fn/thm wrld))) (raise "The symbol ~x0 does not name a function or theorem." fn/thm) (guard-verified-p fn/thm wrld))))
Theorem:
(defthm booleanp-of-guard-verified-p+ (b* ((yes/no (guard-verified-p+ fn/thm wrld))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm function/theorem-symbolp-when-guard-verified-p+ (implies (guard-verified-p+ fn/thm wrld) (or (function-symbolp fn/thm wrld) (theorem-symbolp fn/thm wrld))))