(local-variables expr) → vars
Function:
(defun local-variables (expr) (declare (xargs :guard t)) (let ((__function__ 'local-variables)) (declare (ignorable __function__)) (if (atom expr) nil (let ((rec-vars (append (local-variables (car expr)) (local-variables (cdr expr))))) (if (and (expressionp expr) (equal (expression-kind expr) ':bind)) (append (expression-bind->variables expr) rec-vars) rec-vars)))))
Theorem:
(defthm typed-variable-listp-of-local-variables (b* ((vars (local-variables expr))) (typed-variable-listp vars)) :rule-classes :rewrite)