Function:
(defun lhs->svex (x) (declare (xargs :guard (lhs-p x))) (let ((__function__ 'lhs->svex)) (declare (ignorable __function__)) (if (atom x) (svex-quote (4vec-z)) (b* (((lhrange xf) (car x))) (svex-concat xf.w (lhatom->svex xf.atom) (lhs->svex (cdr x)))))))
Theorem:
(defthm svex-p-of-lhs->svex (b* ((xx (lhs->svex x))) (svex-p xx)) :rule-classes :rewrite)
Theorem:
(defthm lhs->svex-of-lhs-fix-x (equal (lhs->svex (lhs-fix x)) (lhs->svex x)))
Theorem:
(defthm lhs->svex-lhs-equiv-congruence-on-x (implies (lhs-equiv x x-equiv) (equal (lhs->svex x) (lhs->svex x-equiv))) :rule-classes :congruence)
Theorem:
(defthm lhs->svex-correct (equal (svex-eval (lhs->svex x) env) (lhs-eval x env)))
Theorem:
(defthm vars-of-lhs->svex (implies (not (member v (lhs-vars x))) (not (member v (svex-vars (lhs->svex x))))))