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