Fixing function for unsigned-byte-listp.
(unsigned-byte-list-fix bits x) → fixed-x
This lifts unsigned-byte-fix to lists.
See that function for more information,
in particular about the fixing of
Function:
(defun unsigned-byte-list-fix (bits x) (declare (xargs :guard (and (natp bits) (unsigned-byte-listp bits x)))) (let ((__function__ 'unsigned-byte-list-fix)) (declare (ignorable __function__)) (mbe :logic (cond ((atom x) nil) (t (cons (unsigned-byte-fix bits (car x)) (unsigned-byte-list-fix bits (cdr x))))) :exec x)))
Theorem:
(defthm return-type-of-unsigned-byte-list-fix (implies (natp bits) (b* ((fixed-x (unsigned-byte-list-fix bits x))) (unsigned-byte-listp bits fixed-x))) :rule-classes :rewrite)
Theorem:
(defthm integer-listp-of-unsigned-byte-list-fix (b* ((fixed-x (unsigned-byte-list-fix bits x))) (integer-listp fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm unsigned-byte-list-fix-when-unsigned-byte-listp (implies (unsigned-byte-listp (nfix bits) x) (equal (unsigned-byte-list-fix bits x) x)))
Theorem:
(defthm unsigned-byte-list-fix-of-nil (equal (unsigned-byte-list-fix bits nil) nil))
Theorem:
(defthm unsigned-byte-list-fix-of-cons (equal (unsigned-byte-list-fix bits (cons x y)) (cons (unsigned-byte-fix bits x) (unsigned-byte-list-fix bits y))))
Theorem:
(defthm unsigned-byte-list-fix-of-append (equal (unsigned-byte-list-fix bits (append x y)) (append (unsigned-byte-list-fix bits x) (unsigned-byte-list-fix bits y))))
Theorem:
(defthm len-of-unsigned-byte-list-fix (equal (len (unsigned-byte-list-fix bits x)) (len x)))
Theorem:
(defthm consp-of-unsigned-byte-list-fix (equal (consp (unsigned-byte-list-fix bits x)) (consp x)))
Theorem:
(defthm car-of-unsigned-byte-list-fix (implies (consp x) (equal (car (unsigned-byte-list-fix bits x)) (unsigned-byte-fix bits (car x)))))
Theorem:
(defthm cdr-of-unsigned-byte-list-fix (implies (consp x) (equal (cdr (unsigned-byte-list-fix bits x)) (unsigned-byte-list-fix bits (cdr x)))))
Theorem:
(defthm rev-of-unsigned-byte-list-fix (equal (rev (unsigned-byte-list-fix bits x)) (unsigned-byte-list-fix bits (rev x))))