Function:
(defun distance-to-tab$inline (col tabsize) (declare (xargs :guard (and (natp col) (posp tabsize)))) (declare (type unsigned-byte col tabsize)) (declare (xargs :split-types t)) (let ((acl2::__function__ 'distance-to-tab)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((col (nfix col)) (tabsize (acl2::pos-fix tabsize))) (nfix (- tabsize (rem col tabsize)))) :exec (- tabsize (the unsigned-byte (rem col tabsize))))))
Theorem:
(defthm distance-to-tab$inline-of-nfix-col (equal (distance-to-tab$inline (nfix col) tabsize) (distance-to-tab$inline col tabsize)))
Theorem:
(defthm distance-to-tab$inline-nat-equiv-congruence-on-col (implies (acl2::nat-equiv col col-equiv) (equal (distance-to-tab$inline col tabsize) (distance-to-tab$inline col-equiv tabsize))) :rule-classes :congruence)
Theorem:
(defthm distance-to-tab$inline-of-pos-fix-tabsize (equal (distance-to-tab$inline col (acl2::pos-fix tabsize)) (distance-to-tab$inline col tabsize)))
Theorem:
(defthm distance-to-tab$inline-pos-equiv-congruence-on-tabsize (implies (acl2::pos-equiv tabsize tabsize-equiv) (equal (distance-to-tab$inline col tabsize) (distance-to-tab$inline col tabsize-equiv))) :rule-classes :congruence)