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