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