Convert an integer into a sparseint.
(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__)) (int-to-sparseint$ x)))
Theorem:
(defthm sparseint-p-of-int-to-sparseint (b* ((sint (int-to-sparseint$inline x))) (sparseint-p sint)) :rule-classes :rewrite)
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)