Function:
(defun logapp (size i j) (declare (type unsigned-byte size)) (declare (xargs :guard (and (and (integerp size) (<= 0 size)) (integerp i) (integerp j)))) (declare (xargs :split-types t)) (let ((__function__ 'logapp)) (declare (ignorable __function__)) (mbe :logic (let ((j (ifix j))) (+ (loghead size i) (* j (expt2 size)))) :exec (+ (loghead size i) (ash j size)))))
Theorem:
(defthm logapp-type (b* ((int (logapp size i j))) (integerp int)) :rule-classes :type-prescription)