(svdecomp-env-extract keys env) → res
Function:
(defun svdecomp-env-extract (keys env) (declare (xargs :guard (and (svarlist-p keys) (svdecomp-symenv-p env)))) (let ((__function__ 'svdecomp-env-extract)) (declare (ignorable __function__)) (if (atom keys) nil (cons (cons (svar-fix (car keys)) (let ((look (svar-lookup (car keys) env))) (if look (cdr look) (quote-4vec-x)))) (svdecomp-env-extract (cdr keys) env)))))
Theorem:
(defthm svdecomp-symenv-p-of-svdecomp-env-extract (implies (svdecomp-symenv-p env) (b* ((res (svdecomp-env-extract keys env))) (svdecomp-symenv-p res))) :rule-classes :rewrite)
Theorem:
(defthm svar-lookup-in-svdecomp-env-extract (equal (svar-lookup k (svdecomp-env-extract keys env)) (and (member (svar-fix k) (svarlist-fix keys)) (or (svar-lookup k env) (cons (svar-fix k) (quote-4vec-x))))))
Theorem:
(defthm svex-env-lookup-in-svdecomp-ev-symenv (equal (svex-env-lookup k (svdecomp-ev-symenv env a)) (let ((pair (svar-lookup k env))) (if pair (4vec-fix (svdecomp-ev (cdr pair) a)) (4vec-x)))))
Theorem:
(defthm eval-of-svdecomp-env-extract (svex-env-equiv (svdecomp-ev-symenv (svdecomp-env-extract keys env) a) (svex-env-extract keys (svdecomp-ev-symenv env a))))
Theorem:
(defthm keys-of-svdecomp-env-extract (equal (svar-alist-keys (svdecomp-env-extract keys env)) (svarlist-fix keys)))
Theorem:
(defthm svdecomp-env-extract-of-svarlist-fix-keys (equal (svdecomp-env-extract (svarlist-fix keys) env) (svdecomp-env-extract keys env)))
Theorem:
(defthm svdecomp-env-extract-svarlist-equiv-congruence-on-keys (implies (svarlist-equiv keys keys-equiv) (equal (svdecomp-env-extract keys env) (svdecomp-env-extract keys-equiv env))) :rule-classes :congruence)
Theorem:
(defthm svdecomp-env-extract-of-svar-alist-fix-env (equal (svdecomp-env-extract keys (svar-alist-fix env)) (svdecomp-env-extract keys env)))
Theorem:
(defthm svdecomp-env-extract-svar-alist-equiv-congruence-on-env (implies (svar-alist-equiv env env-equiv) (equal (svdecomp-env-extract keys env) (svdecomp-env-extract keys env-equiv))) :rule-classes :congruence)