Check if a symbol value is the name of a primitive function.
(primitive-function-namep name) → yes/no
Function:
(defun primitive-function-namep (name) (declare (xargs :guard (symbol-valuep name))) (let ((__function__ 'primitive-function-namep)) (declare (ignorable __function__)) (or (symbol-value-equiv name (lift-symbol 'acl2-numberp)) (symbol-value-equiv name (lift-symbol 'rationalp)) (symbol-value-equiv name (lift-symbol 'integerp)) (symbol-value-equiv name (lift-symbol 'complex-rationalp)) (symbol-value-equiv name (lift-symbol 'complex)) (symbol-value-equiv name (lift-symbol 'realpart)) (symbol-value-equiv name (lift-symbol 'imagpart)) (symbol-value-equiv name (lift-symbol 'numerator)) (symbol-value-equiv name (lift-symbol 'denominator)) (symbol-value-equiv name (lift-symbol 'unary--)) (symbol-value-equiv name (lift-symbol 'unary-/)) (symbol-value-equiv name (lift-symbol 'binary-+)) (symbol-value-equiv name (lift-symbol 'binary-*)) (symbol-value-equiv name (lift-symbol '<)) (symbol-value-equiv name (lift-symbol 'characterp)) (symbol-value-equiv name (lift-symbol 'char-code)) (symbol-value-equiv name (lift-symbol 'code-char)) (symbol-value-equiv name (lift-symbol 'stringp)) (symbol-value-equiv name (lift-symbol 'coerce)) (symbol-value-equiv name (lift-symbol 'symbolp)) (symbol-value-equiv name (lift-symbol 'symbol-package-name)) (symbol-value-equiv name (lift-symbol 'symbol-name)) (symbol-value-equiv name (lift-symbol 'intern-in-package-of-symbol)) (symbol-value-equiv name (lift-symbol 'consp)) (symbol-value-equiv name (lift-symbol 'cons)) (symbol-value-equiv name (lift-symbol 'car)) (symbol-value-equiv name (lift-symbol 'cdr)) (symbol-value-equiv name (lift-symbol 'pkg-imports)) (symbol-value-equiv name (lift-symbol 'pkg-witness)) (symbol-value-equiv name (lift-symbol 'equal)) (symbol-value-equiv name (lift-symbol 'if)) (symbol-value-equiv name (lift-symbol 'acl2::bad-atom<=)))))
Theorem:
(defthm booleanp-of-primitive-function-namep (b* ((yes/no (primitive-function-namep name))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm primitive-function-namep-of-symbol-value-fix-name (equal (primitive-function-namep (symbol-value-fix name)) (primitive-function-namep name)))
Theorem:
(defthm primitive-function-namep-symbol-value-equiv-congruence-on-name (implies (symbol-value-equiv name name-equiv) (equal (primitive-function-namep name) (primitive-function-namep name-equiv))) :rule-classes :congruence)