Accessor for values of type
(integer-from-uchar x) → y
Function:
(defun integer-from-uchar (x) (declare (xargs :guard (ucharp x))) (let ((__function__ 'integer-from-uchar)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x))) (uchar-integer-fix (std::da-nth 0 (cdr x)))) :exec (std::da-nth 0 (cdr x)))))
Theorem:
(defthm uchar-integerp-of-integer-from-uchar (b* ((y (integer-from-uchar x))) (uchar-integerp y)) :rule-classes :rewrite)
Theorem:
(defthm uchar-from-integer-of-integer-from-uchar (equal (uchar-from-integer (integer-from-uchar x)) (uchar-fix x)))
Theorem:
(defthm integer-from-uchar-of-uchar-from-integer (equal (integer-from-uchar (uchar-from-integer get)) (uchar-integer-fix get)))
Theorem:
(defthm integer-from-uchar-upper-bound (<= (integer-from-uchar x) (uchar-max)) :rule-classes :linear)
Theorem:
(defthm integer-from-uchar-of-uchar-fix-x (equal (integer-from-uchar (uchar-fix x)) (integer-from-uchar x)))
Theorem:
(defthm integer-from-uchar-uchar-equiv-congruence-on-x (implies (uchar-equiv x x-equiv) (equal (integer-from-uchar x) (integer-from-uchar x-equiv))) :rule-classes :congruence)