Check if a term calls only guard-verified functions.
(guard-verified-fnsp term wrld) → yes/no
Note that if any function
inside the
The name of this function is consistent with
the name of
Function:
(defun guard-verified-fnsp (term wrld) (declare (xargs :guard (and (pseudo-termp term) (plist-worldp wrld)))) (let ((__function__ 'guard-verified-fnsp)) (declare (ignorable __function__)) (or (variablep term) (fquotep term) (and (guard-verified-fnsp-lst (fargs term) wrld) (let ((fn (ffn-symb term))) (if (symbolp fn) (guard-verified-p fn wrld) (guard-verified-fnsp (lambda-body fn) wrld)))))))
Function:
(defun guard-verified-fnsp-lst (terms wrld) (declare (xargs :guard (and (pseudo-term-listp terms) (plist-worldp wrld)))) (let ((__function__ 'guard-verified-fnsp-lst)) (declare (ignorable __function__)) (or (endp terms) (and (guard-verified-fnsp (car terms) wrld) (guard-verified-fnsp-lst (cdr terms) wrld)))))
Theorem:
(defthm return-type-of-guard-verified-fnsp.yes/no (b* ((?yes/no (guard-verified-fnsp term wrld))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-guard-verified-fnsp-lst.yes/no (b* ((?yes/no (guard-verified-fnsp-lst terms wrld))) (booleanp yes/no)) :rule-classes :rewrite)