(assigns-compose x alist) → new-x
Function:
(defun assigns-compose (x alist) (declare (xargs :guard (and (assigns-p x) (svex-alist-p alist)))) (let ((__function__ 'assigns-compose)) (declare (ignorable __function__)) (b* ((x (assigns-fix x)) ((when (atom x)) nil) ((cons key (driver dr)) (car x))) (cons (cons key (change-driver dr :value (svex-compose dr.value alist))) (assigns-compose (cdr x) alist)))))
Theorem:
(defthm assigns-p-of-assigns-compose (b* ((new-x (assigns-compose x alist))) (assigns-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vars-of-assigns-compose (b* ((?new-x (assigns-compose x alist))) (implies (and (not (member v (assigns-vars x))) (not (member v (svex-alist-vars alist)))) (not (member v (assigns-vars new-x))))))
Theorem:
(defthm assigns-compose-of-assigns-fix-x (equal (assigns-compose (assigns-fix x) alist) (assigns-compose x alist)))
Theorem:
(defthm assigns-compose-assigns-equiv-congruence-on-x (implies (assigns-equiv x x-equiv) (equal (assigns-compose x alist) (assigns-compose x-equiv alist))) :rule-classes :congruence)
Theorem:
(defthm assigns-compose-of-svex-alist-fix-alist (equal (assigns-compose x (svex-alist-fix alist)) (assigns-compose x alist)))
Theorem:
(defthm assigns-compose-svex-alist-equiv-congruence-on-alist (implies (svex-alist-equiv alist alist-equiv) (equal (assigns-compose x alist) (assigns-compose x alist-equiv))) :rule-classes :congruence)