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