Check if a symbol names a constant,
i.e. it has a
(constant-symbolp sym wrld) → yes/no
This function is named in analogy to the function-symbolp built-in system utility.
Function:
(defun constant-symbolp (sym wrld) (declare (xargs :guard (and (symbolp sym) (plist-worldp wrld)))) (let ((__function__ 'constant-symbolp)) (declare (ignorable __function__)) (not (eq (getpropc sym 'const t wrld) t))))
Theorem:
(defthm booleanp-of-constant-symbolp (b* ((yes/no (constant-symbolp sym wrld))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm constant-symbolp-forward-to-symbolp (implies (and (constant-symbolp fn wrld) (plist-worldp wrld)) (symbolp fn)) :rule-classes :forward-chaining)