(svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev) → (mv new-nrev out-multirefs1 memo1)
Function:
(defun svexlist-rewrite-nrev (x masks multirefs out-multirefs memo acl2::nrev) (declare (xargs :stobjs (acl2::nrev))) (declare (xargs :guard (and (svexlist-p x) (svex-mask-alist-p masks) (svex-key-alist-p multirefs) (svex-key-alist-p out-multirefs) (svex-svex-memo-p memo)))) (let ((__function__ 'svexlist-rewrite-nrev)) (declare (ignorable __function__)) (if (atom x) (b* ((acl2::nrev (acl2::nrev-fix acl2::nrev))) (mv acl2::nrev (svex-key-alist-fix out-multirefs) (svex-svex-memo-fix memo))) (b* (((mv first out-multirefs memo) (svex-rewrite (car x) masks multirefs out-multirefs memo)) (acl2::nrev (acl2::nrev-push first acl2::nrev))) (svexlist-rewrite-nrev (cdr x) masks multirefs out-multirefs memo acl2::nrev)))))
Theorem:
(defthm svex-key-alist-p-of-svexlist-rewrite-nrev.out-multirefs1 (b* (((mv ?new-nrev ?out-multirefs1 ?memo1) (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev))) (svex-key-alist-p out-multirefs1)) :rule-classes :rewrite)
Theorem:
(defthm svex-svex-memo-p-of-svexlist-rewrite-nrev.memo1 (b* (((mv ?new-nrev ?out-multirefs1 ?memo1) (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev))) (svex-svex-memo-p memo1)) :rule-classes :rewrite)
Theorem:
(defthm svexlist-rewrite-nrev-removal (b* (((mv ?new-nrev ?out-multirefs1 ?memo1) (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev))) (b* (((mv out-spec out-multirefs1-spec memo1-spec) (svexlist-rewrite x masks multirefs out-multirefs memo))) (and (equal new-nrev (append acl2::nrev out-spec)) (equal out-multirefs1 out-multirefs1-spec) (equal memo1 memo1-spec)))))
Theorem:
(defthm svexlist-rewrite-nrev-of-svexlist-fix-x (equal (svexlist-rewrite-nrev (svexlist-fix x) masks multirefs out-multirefs memo acl2::nrev) (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev)))
Theorem:
(defthm svexlist-rewrite-nrev-svexlist-equiv-congruence-on-x (implies (svexlist-equiv x x-equiv) (equal (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev) (svexlist-rewrite-nrev x-equiv masks multirefs out-multirefs memo acl2::nrev))) :rule-classes :congruence)
Theorem:
(defthm svexlist-rewrite-nrev-of-svex-mask-alist-fix-masks (equal (svexlist-rewrite-nrev x (svex-mask-alist-fix masks) multirefs out-multirefs memo acl2::nrev) (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev)))
Theorem:
(defthm svexlist-rewrite-nrev-svex-mask-alist-equiv-congruence-on-masks (implies (svex-mask-alist-equiv masks masks-equiv) (equal (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev) (svexlist-rewrite-nrev x masks-equiv multirefs out-multirefs memo acl2::nrev))) :rule-classes :congruence)
Theorem:
(defthm svexlist-rewrite-nrev-of-svex-key-alist-fix-multirefs (equal (svexlist-rewrite-nrev x masks (svex-key-alist-fix multirefs) out-multirefs memo acl2::nrev) (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev)))
Theorem:
(defthm svexlist-rewrite-nrev-svex-key-alist-equiv-congruence-on-multirefs (implies (svex-key-alist-equiv multirefs multirefs-equiv) (equal (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev) (svexlist-rewrite-nrev x masks multirefs-equiv out-multirefs memo acl2::nrev))) :rule-classes :congruence)
Theorem:
(defthm svexlist-rewrite-nrev-of-svex-key-alist-fix-out-multirefs (equal (svexlist-rewrite-nrev x masks multirefs (svex-key-alist-fix out-multirefs) memo acl2::nrev) (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev)))
Theorem:
(defthm svexlist-rewrite-nrev-svex-key-alist-equiv-congruence-on-out-multirefs (implies (svex-key-alist-equiv out-multirefs out-multirefs-equiv) (equal (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev) (svexlist-rewrite-nrev x masks multirefs out-multirefs-equiv memo acl2::nrev))) :rule-classes :congruence)
Theorem:
(defthm svexlist-rewrite-nrev-of-svex-svex-memo-fix-memo (equal (svexlist-rewrite-nrev x masks multirefs out-multirefs (svex-svex-memo-fix memo) acl2::nrev) (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev)))
Theorem:
(defthm svexlist-rewrite-nrev-svex-svex-memo-equiv-congruence-on-memo (implies (svex-svex-memo-equiv memo memo-equiv) (equal (svexlist-rewrite-nrev x masks multirefs out-multirefs memo acl2::nrev) (svexlist-rewrite-nrev x masks multirefs out-multirefs memo-equiv acl2::nrev))) :rule-classes :congruence)