Compute the integer-length of a sparseint. Returns an integer, not a sparseint.
(sparseint-length x) → length
Function:
(defun sparseint-length$inline (x) (declare (xargs :guard (sparseint-p x))) (let ((__function__ 'sparseint-length)) (declare (ignorable __function__)) (sparseint$-length (sparseint-fix x))))
Theorem:
(defthm natp-of-sparseint-length (b* ((length (sparseint-length$inline x))) (natp length)) :rule-classes :type-prescription)
Theorem:
(defthm sparseint-length-correct (b* ((common-lisp::?length (sparseint-length$inline x))) (equal length (integer-length (sparseint-val x)))))
Theorem:
(defthm sparseint-length$inline-of-sparseint-fix-x (equal (sparseint-length$inline (sparseint-fix x)) (sparseint-length$inline x)))
Theorem:
(defthm sparseint-length$inline-sparseint-equiv-congruence-on-x (implies (sparseint-equiv x x-equiv) (equal (sparseint-length$inline x) (sparseint-length$inline x-equiv))) :rule-classes :congruence)