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