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