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