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