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