Check if a constant has formal dynamic semantics.
Based on c::eval-const and c::exec-const, only integer constants pass the test.
Function:
(defun const-formalp (const) (declare (xargs :guard (constp const))) (let ((__function__ 'const-formalp)) (declare (ignorable __function__)) (const-case const :int)))
Theorem:
(defthm booleanp-of-const-formalp (b* ((yes/no (const-formalp const))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm const-formalp-of-const-fix-const (equal (const-formalp (const-fix const)) (const-formalp const)))
Theorem:
(defthm const-formalp-const-equiv-congruence-on-const (implies (const-equiv const const-equiv) (equal (const-formalp const) (const-formalp const-equiv))) :rule-classes :congruence)