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