Check if a lambda expression is closed, i.e. it has no free variables.
(lambda-closedp lambd) → yes/no
Function:
(defun lambda-closedp (lambd) (declare (xargs :guard (pseudo-lambdap lambd))) (let ((__function__ 'lambda-closedp)) (declare (ignorable __function__)) (subsetp-eq (all-vars (lambda-body lambd)) (lambda-formals lambd))))
Theorem:
(defthm booleanp-of-lambda-closedp (b* ((yes/no (lambda-closedp lambd))) (booleanp yes/no)) :rule-classes :rewrite)