Raw accessor for the upper integer from a 4vec.
Function:
(defun 4vec->upper$inline (x) (declare (xargs :guard (4vec-p x))) (let ((__function__ '4vec->upper)) (declare (ignorable __function__)) (mbe :logic (if (consp x) (ifix (car x)) (if (integerp x) x -1)) :exec (if (consp x) (car x) x))))
Theorem:
(defthm integerp-of-4vec->upper (b* ((upper (4vec->upper$inline x))) (integerp upper)) :rule-classes (:rewrite :type-prescription))
Theorem:
(defthm 4vec->upper-of-4vec (equal (4vec->upper (4vec upper lower)) (ifix upper)))
Theorem:
(defthm 4vec->upper-of-4vec-fix (equal (4vec->upper (4vec-fix x)) (4vec->upper x)))
Theorem:
(defthm 4vec-equiv-implies-equal-4vec->upper-1 (implies (4vec-equiv x x-equiv) (equal (4vec->upper x) (4vec->upper x-equiv))) :rule-classes (:congruence))