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