Set of variables in an expression.
(expression-vars expr) → vars
Function:
(defun expression-vars (expr) (declare (xargs :guard (expressionp expr))) (let ((__function__ 'expression-vars)) (declare (ignorable __function__)) (expression-case expr :const nil :var (insert expr.name nil) :add (union (expression-vars expr.arg1) (expression-vars expr.arg2)) :mul (union (expression-vars expr.arg1) (expression-vars expr.arg2)))))
Theorem:
(defthm string-setp-of-expression-vars (b* ((vars (expression-vars expr))) (string-setp vars)) :rule-classes :rewrite)