Recognize pseudo-term-functions, i.e. functions in pseudo-terms.
(pseudo-termfnp x) → yes/no
Function:
(defun pseudo-termfnp (x) (declare (xargs :guard t)) (let ((__function__ 'pseudo-termfnp)) (declare (ignorable __function__)) (or (symbolp x) (pseudo-lambdap x))))
Theorem:
(defthm booleanp-of-pseudo-termfnp (b* ((yes/no (pseudo-termfnp x))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm pseudo-termfnp-when-symbolp (implies (symbolp x) (pseudo-termfnp x)))
Theorem:
(defthm pseudo-termfnp-when-pseudo-lambdap (implies (pseudo-lambdap x) (pseudo-termfnp x)))
Theorem:
(defthm pseudo-termfnp-of-car-when-pseudo-termp (implies (and (pseudo-termp term) (consp term)) (pseudo-termfnp (car term))))
Theorem:
(defthm pseudo-termp-of-cons-when-pseudo-termfnp (implies (and (pseudo-termfnp fn) (pseudo-term-listp terms) (or (atom fn) (equal (len terms) (len (lambda-formals fn)))) (not (eq fn 'quote))) (pseudo-termp (cons fn terms))))