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