(wirelist->names x) maps wire->name across a list.
(wirelist->names x) → names
This is an ordinary defprojection.
Function:
(defun wirelist->names-exec (x acc) (declare (xargs :guard (wirelist-p x))) (declare (xargs :guard t)) (let ((__function__ 'wirelist->names-exec)) (declare (ignorable __function__)) (if (consp x) (wirelist->names-exec (cdr x) (cons (wire->name (car x)) acc)) acc)))
Function:
(defun wirelist->names-nrev (x acl2::nrev) (declare (xargs :stobjs (acl2::nrev))) (declare (xargs :guard (wirelist-p x))) (declare (xargs :guard t)) (let ((__function__ 'wirelist->names-nrev)) (declare (ignorable __function__)) (if (atom x) (acl2::nrev-fix acl2::nrev) (let ((acl2::nrev (acl2::nrev-push (wire->name (car x)) acl2::nrev))) (wirelist->names-nrev (cdr x) acl2::nrev)))))
Function:
(defun wirelist->names (x) (declare (xargs :guard (wirelist-p x))) (declare (xargs :guard t)) (let ((__function__ 'wirelist->names)) (declare (ignorable __function__)) (mbe :logic (if (consp x) (cons (wire->name (car x)) (wirelist->names (cdr x))) nil) :exec (if (atom x) nil (acl2::with-local-nrev (wirelist->names-nrev x acl2::nrev))))))
Theorem:
(defthm namelist-p-of-wirelist->names (b* ((names (wirelist->names x))) (namelist-p names)) :rule-classes :rewrite)
Theorem:
(defthm wirelist->names-of-wirelist-fix-x (equal (wirelist->names (wirelist-fix x)) (wirelist->names x)))
Theorem:
(defthm wirelist->names-wirelist-equiv-congruence-on-x (implies (wirelist-equiv x x-equiv) (equal (wirelist->names x) (wirelist->names x-equiv))) :rule-classes :congruence)
Theorem:
(defthm wirelist->names-of-take (implies (<= (nfix acl2::n) (len x)) (equal (wirelist->names (take acl2::n x)) (take acl2::n (wirelist->names x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm wirelist->names-nrev-removal (equal (wirelist->names-nrev x acl2::nrev) (append acl2::nrev (wirelist->names x))) :rule-classes ((:rewrite)))
Theorem:
(defthm wirelist->names-exec-removal (equal (wirelist->names-exec x acl2::acc) (revappend (wirelist->names x) acl2::acc)) :rule-classes ((:rewrite)))
Theorem:
(defthm wirelist->names-of-rev (equal (wirelist->names (rev x)) (rev (wirelist->names x))) :rule-classes ((:rewrite)))
Theorem:
(defthm wirelist->names-of-list-fix (equal (wirelist->names (list-fix x)) (wirelist->names x)) :rule-classes ((:rewrite)))
Theorem:
(defthm wirelist->names-of-append (equal (wirelist->names (append acl2::a acl2::b)) (append (wirelist->names acl2::a) (wirelist->names acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm cdr-of-wirelist->names (equal (cdr (wirelist->names x)) (wirelist->names (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm car-of-wirelist->names (equal (car (wirelist->names x)) (and (consp x) (wire->name (car x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm wirelist->names-under-iff (iff (wirelist->names x) (consp x)) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-of-wirelist->names (equal (consp (wirelist->names x)) (consp x)) :rule-classes ((:rewrite)))
Theorem:
(defthm len-of-wirelist->names (equal (len (wirelist->names x)) (len x)) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-of-wirelist->names (true-listp (wirelist->names x)) :rule-classes :type-prescription)
Theorem:
(defthm wirelist->names-when-not-consp (implies (not (consp x)) (equal (wirelist->names x) nil)) :rule-classes ((:rewrite)))
Theorem:
(defthm wirelist->names-of-cons (equal (wirelist->names (cons acl2::a acl2::b)) (cons (wire->name acl2::a) (wirelist->names acl2::b))) :rule-classes ((:rewrite)))