Function:
(defun assigns-subst (x aliases svexarr) (declare (xargs :stobjs (aliases svexarr))) (declare (xargs :guard (assigns-p x))) (declare (xargs :guard (and (svarlist-boundedp (assigns-vars x) (aliass-length aliases)) (svarlist-boundedp (assigns-vars x) (svexs-length svexarr))))) (let ((__function__ 'assigns-subst)) (declare (ignorable __function__)) (mbe :logic (b* ((x (assigns-fix x)) ((when (atom x)) nil) ((cons lhs (driver rhs)) (car x)) (lhs (lhs-alias-norm lhs aliases)) (val (svex-subst-from-svexarr rhs.value svexarr))) (cons (cons lhs (change-driver rhs :value val)) (assigns-subst (cdr x) aliases svexarr))) :exec (if (atom x) nil (with-local-stobj nrev (mv-let (ans nrev) (b* ((nrev (assigns-subst-nrev x aliases svexarr nrev)) ((mv ans nrev) (acl2::nrev-finish nrev))) (mv ans nrev)) ans))))))
Theorem:
(defthm assigns-p-of-assigns-subst (b* ((xx (assigns-subst x aliases svexarr))) (assigns-p xx)) :rule-classes :rewrite)
Theorem:
(defthm assigns-subst-of-assigns-fix-x (equal (assigns-subst (assigns-fix x) aliases svexarr) (assigns-subst x aliases svexarr)))
Theorem:
(defthm assigns-subst-assigns-equiv-congruence-on-x (implies (assigns-equiv x x-equiv) (equal (assigns-subst x aliases svexarr) (assigns-subst x-equiv aliases svexarr))) :rule-classes :congruence)
Theorem:
(defthm assigns-subst-of-lhslist-fix-aliases (equal (assigns-subst x (lhslist-fix aliases) svexarr) (assigns-subst x aliases svexarr)))
Theorem:
(defthm assigns-subst-lhslist-equiv-congruence-on-aliases (implies (lhslist-equiv aliases aliases-equiv) (equal (assigns-subst x aliases svexarr) (assigns-subst x aliases-equiv svexarr))) :rule-classes :congruence)
Theorem:
(defthm svarlist-addr-p-of-assigns-subst (implies (and (svarlist-addr-p (svexarr-vars svexarr)) (svarlist-addr-p (aliases-vars aliases))) (svarlist-addr-p (assigns-vars (assigns-subst x aliases svexarr)))))