(int-to-sparseint$ x) → sint
Function:
(defun int-to-sparseint$$inline (x) (declare (xargs :guard (integerp x))) (let ((__function__ 'int-to-sparseint$)) (declare (ignorable __function__)) (mbe :logic (b* (((mv sint ?height ?width) (int-to-sparseint$-rec x (+ 1 (integer-length x)) 0))) sint) :exec (if (< (+ 1 (integer-length x)) (sparseint$-leaf-bitlimit)) x (b* (((mv sint ?height ?width) (int-to-sparseint$-rec x (+ 1 (integer-length x)) 0))) sint)))))
Theorem:
(defthm sparseint$-p-of-int-to-sparseint$ (b* ((sint (int-to-sparseint$$inline x))) (sparseint$-p sint)) :rule-classes :rewrite)
Theorem:
(defthm sparseint$-height-correctp-of-int-to-sparseint$ (b* ((?sint (int-to-sparseint$$inline x))) (sparseint$-height-correctp sint)))
Theorem:
(defthm sparseint$-val-of-int-to-sparseint$ (b* ((?sint (int-to-sparseint$$inline x))) (equal (sparseint$-val sint) (ifix x))))
Theorem:
(defthm int-to-sparseint$$inline-of-ifix-x (equal (int-to-sparseint$$inline (ifix x)) (int-to-sparseint$$inline x)))
Theorem:
(defthm int-to-sparseint$$inline-int-equiv-congruence-on-x (implies (int-equiv x x-equiv) (equal (int-to-sparseint$$inline x) (int-to-sparseint$$inline x-equiv))) :rule-classes :congruence)