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