(charlist-fix x) maps ACL2::char-fix across a list.
(charlist-fix x) → *
This is an ordinary defprojection.
Function:
(defun charlist-fix-exec (x acc) (declare (xargs :guard t)) (let ((__function__ 'charlist-fix-exec)) (declare (ignorable __function__)) (if (consp x) (charlist-fix-exec (cdr x) (cons (acl2::char-fix (car x)) acc)) acc)))
Function:
(defun charlist-fix-nrev (x acl2::nrev) (declare (xargs :stobjs (acl2::nrev))) (declare (xargs :guard t)) (let ((__function__ 'charlist-fix-nrev)) (declare (ignorable __function__)) (if (atom x) (acl2::nrev-fix acl2::nrev) (let ((acl2::nrev (acl2::nrev-push (acl2::char-fix (car x)) acl2::nrev))) (charlist-fix-nrev (cdr x) acl2::nrev)))))
Function:
(defun charlist-fix (x) (declare (xargs :guard t)) (let ((__function__ 'charlist-fix)) (declare (ignorable __function__)) (mbe :logic (if (consp x) (cons (acl2::char-fix (car x)) (charlist-fix (cdr x))) nil) :exec (if (atom x) nil (acl2::with-local-nrev (charlist-fix-nrev x acl2::nrev))))))
Theorem:
(defthm charlist-fix-of-rev (equal (charlist-fix (acl2::rev acl2::x)) (acl2::rev (charlist-fix acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm charlist-fix-nrev-removal (equal (charlist-fix-nrev acl2::x acl2::nrev) (append acl2::nrev (charlist-fix acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm charlist-fix-exec-removal (equal (charlist-fix-exec acl2::x acl2::acc) (revappend (charlist-fix acl2::x) acl2::acc)) :rule-classes ((:rewrite)))
Theorem:
(defthm charlist-fix-of-list-fix (equal (charlist-fix (list-fix acl2::x)) (charlist-fix acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm charlist-fix-of-append (equal (charlist-fix (append acl2::a acl2::b)) (append (charlist-fix acl2::a) (charlist-fix acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm cdr-of-charlist-fix (equal (cdr (charlist-fix acl2::x)) (charlist-fix (cdr acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm car-of-charlist-fix (equal (car (charlist-fix acl2::x)) (and (consp acl2::x) (acl2::char-fix (car acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm charlist-fix-under-iff (iff (charlist-fix acl2::x) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-of-charlist-fix (equal (consp (charlist-fix acl2::x)) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm len-of-charlist-fix (equal (len (charlist-fix acl2::x)) (len acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-of-charlist-fix (true-listp (charlist-fix acl2::x)) :rule-classes :type-prescription)
Theorem:
(defthm charlist-fix-when-not-consp (implies (not (consp acl2::x)) (equal (charlist-fix acl2::x) nil)) :rule-classes ((:rewrite)))
Theorem:
(defthm charlist-fix-of-cons (equal (charlist-fix (cons acl2::a acl2::b)) (cons (acl2::char-fix acl2::a) (charlist-fix acl2::b))) :rule-classes ((:rewrite)))