Computes (loghead full-width (logsquash squash-width x)).
Function:
(defun limshift-loghead-of-logsquash (full-width squash-width x) (declare (xargs :guard (and (natp full-width) (natp squash-width) (integerp x)))) (let ((__function__ 'limshift-loghead-of-logsquash)) (declare (ignorable __function__)) (b* ((squash-width (lnfix squash-width)) (full-width (lnfix full-width)) (x (lifix x)) (squash-width-limited (logcollapse (integer-length full-width) squash-width))) (loghead full-width (logsquash squash-width-limited x)))))
Theorem:
(defthm integerp-of-limshift-loghead-of-logsquash (b* ((shifted (limshift-loghead-of-logsquash full-width squash-width x))) (integerp shifted)) :rule-classes :type-prescription)
Theorem:
(defthm limshift-loghead-of-logsquash-correct (equal (limshift-loghead-of-logsquash full-width squash-width x) (loghead full-width (logsquash squash-width x))))