(vl-relocate-assigns loc x) maps change-vl-assign across a list.
(vl-relocate-assigns loc x) → new-x
This is an ordinary defprojection.
Function:
(defun vl-relocate-assigns-exec (loc x acc) (declare (xargs :guard (and (vl-location-p loc) (vl-assignlist-p x)))) (declare (xargs :guard t)) (let ((__function__ 'vl-relocate-assigns-exec)) (declare (ignorable __function__)) (if (consp x) (vl-relocate-assigns-exec loc (cdr x) (cons (change-vl-assign (car x) :loc loc) acc)) acc)))
Function:
(defun vl-relocate-assigns-nrev (loc x nrev) (declare (xargs :stobjs (nrev))) (declare (xargs :guard (and (vl-location-p loc) (vl-assignlist-p x)))) (declare (xargs :guard t)) (let ((__function__ 'vl-relocate-assigns-nrev)) (declare (ignorable __function__)) (if (atom x) (nrev-fix nrev) (let ((nrev (nrev-push (change-vl-assign (car x) :loc loc) nrev))) (vl-relocate-assigns-nrev loc (cdr x) nrev)))))
Function:
(defun vl-relocate-assigns (loc x) (declare (xargs :guard (and (vl-location-p loc) (vl-assignlist-p x)))) (declare (xargs :guard t)) (let ((__function__ 'vl-relocate-assigns)) (declare (ignorable __function__)) (mbe :logic (if (consp x) (cons (change-vl-assign (car x) :loc loc) (vl-relocate-assigns loc (cdr x))) nil) :exec (if (atom x) nil (with-local-nrev (vl-relocate-assigns-nrev loc x nrev))))))
Theorem:
(defthm vl-assignlist-p-of-vl-relocate-assigns (b* ((new-x (vl-relocate-assigns loc x))) (vl-assignlist-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-relocate-assigns-of-vl-location-fix-loc (equal (vl-relocate-assigns (vl-location-fix loc) x) (vl-relocate-assigns loc x)))
Theorem:
(defthm vl-relocate-assigns-vl-location-equiv-congruence-on-loc (implies (vl-location-equiv loc loc-equiv) (equal (vl-relocate-assigns loc x) (vl-relocate-assigns loc-equiv x))) :rule-classes :congruence)
Theorem:
(defthm vl-relocate-assigns-of-vl-assignlist-fix-x (equal (vl-relocate-assigns loc (vl-assignlist-fix x)) (vl-relocate-assigns loc x)))
Theorem:
(defthm vl-relocate-assigns-vl-assignlist-equiv-congruence-on-x (implies (vl-assignlist-equiv x x-equiv) (equal (vl-relocate-assigns loc x) (vl-relocate-assigns loc x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-relocate-assigns-of-update-nth (implies (<= (nfix acl2::n) (len acl2::x)) (equal (vl-relocate-assigns loc (update-nth acl2::n acl2::v acl2::x)) (update-nth acl2::n (change-vl-assign acl2::v :loc loc) (vl-relocate-assigns loc acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-relocate-assigns-of-revappend (equal (vl-relocate-assigns loc (revappend acl2::x acl2::y)) (revappend (vl-relocate-assigns loc acl2::x) (vl-relocate-assigns loc acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm nthcdr-of-vl-relocate-assigns (equal (nthcdr acl2::n (vl-relocate-assigns loc acl2::x)) (vl-relocate-assigns loc (nthcdr acl2::n acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm nth-of-vl-relocate-assigns (equal (nth acl2::n (vl-relocate-assigns loc acl2::x)) (and (< (nfix acl2::n) (len acl2::x)) (change-vl-assign (nth acl2::n acl2::x) :loc loc))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-relocate-assigns-nrev-removal (equal (vl-relocate-assigns-nrev loc acl2::x nrev) (append nrev (vl-relocate-assigns loc acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-relocate-assigns-exec-removal (equal (vl-relocate-assigns-exec loc acl2::x acl2::acc) (revappend (vl-relocate-assigns loc acl2::x) acl2::acc)) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-relocate-assigns-of-take (implies (<= (nfix acl2::n) (len acl2::x)) (equal (vl-relocate-assigns loc (take acl2::n acl2::x)) (take acl2::n (vl-relocate-assigns loc acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm set-equiv-congruence-over-vl-relocate-assigns (implies (set-equiv acl2::x acl2::y) (set-equiv (vl-relocate-assigns loc acl2::x) (vl-relocate-assigns loc acl2::y))) :rule-classes ((:congruence)))
Theorem:
(defthm subsetp-of-vl-relocate-assigns-when-subsetp (implies (subsetp acl2::x acl2::y) (subsetp (vl-relocate-assigns loc acl2::x) (vl-relocate-assigns loc acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm member-of-change-vl-assign-in-vl-relocate-assigns (implies (member acl2::k acl2::x) (member (change-vl-assign acl2::k :loc loc) (vl-relocate-assigns loc acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-relocate-assigns-of-rev (equal (vl-relocate-assigns loc (rev acl2::x)) (rev (vl-relocate-assigns loc acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-relocate-assigns-of-list-fix (equal (vl-relocate-assigns loc (list-fix acl2::x)) (vl-relocate-assigns loc acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-relocate-assigns-of-append (equal (vl-relocate-assigns loc (append acl2::a acl2::b)) (append (vl-relocate-assigns loc acl2::a) (vl-relocate-assigns loc acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm cdr-of-vl-relocate-assigns (equal (cdr (vl-relocate-assigns loc acl2::x)) (vl-relocate-assigns loc (cdr acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm car-of-vl-relocate-assigns (equal (car (vl-relocate-assigns loc acl2::x)) (and (consp acl2::x) (change-vl-assign (car acl2::x) :loc loc))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-relocate-assigns-under-iff (iff (vl-relocate-assigns loc acl2::x) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-of-vl-relocate-assigns (equal (consp (vl-relocate-assigns loc acl2::x)) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm len-of-vl-relocate-assigns (equal (len (vl-relocate-assigns loc acl2::x)) (len acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-of-vl-relocate-assigns (true-listp (vl-relocate-assigns loc acl2::x)) :rule-classes :type-prescription)
Theorem:
(defthm vl-relocate-assigns-when-not-consp (implies (not (consp acl2::x)) (equal (vl-relocate-assigns loc acl2::x) nil)) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-relocate-assigns-of-cons (equal (vl-relocate-assigns loc (cons acl2::a acl2::b)) (cons (change-vl-assign acl2::a :loc loc) (vl-relocate-assigns loc acl2::b))) :rule-classes ((:rewrite)))