(sparseint$-equal-int offset x y) → equal
Function:
(defun sparseint$-equal-int (offset x y) (declare (xargs :guard (and (natp offset) (sparseint$-p x) (integerp y)))) (let ((__function__ 'sparseint$-equal-int)) (declare (ignorable __function__)) (b* ((y (lifix y)) (offset (lnfix offset))) (sparseint$-case x :leaf (equal (logtail offset x.val) y) :concat (b* (((when (<= x.width offset)) (sparseint$-equal-int (- offset x.width) x.msbs y)) (width1 (- x.width offset))) (and (sparseint$-equal-int-width width1 offset x.lsbs (bignum-logext width1 y)) (sparseint$-equal-int 0 x.msbs (logtail width1 y))))))))
Theorem:
(defthm booleanp-of-sparseint$-equal-int (b* ((equal (sparseint$-equal-int offset x y))) (booleanp equal)) :rule-classes :type-prescription)
Theorem:
(defthm sparseint$-equal-int-correct (b* ((common-lisp::?equal (sparseint$-equal-int offset x y))) (equal equal (equal (logtail offset (sparseint$-val x)) (ifix y)))))
Theorem:
(defthm sparseint$-equal-int-of-nfix-offset (equal (sparseint$-equal-int (nfix offset) x y) (sparseint$-equal-int offset x y)))
Theorem:
(defthm sparseint$-equal-int-nat-equiv-congruence-on-offset (implies (nat-equiv offset offset-equiv) (equal (sparseint$-equal-int offset x y) (sparseint$-equal-int offset-equiv x y))) :rule-classes :congruence)
Theorem:
(defthm sparseint$-equal-int-of-sparseint$-fix-x (equal (sparseint$-equal-int offset (sparseint$-fix x) y) (sparseint$-equal-int offset x y)))
Theorem:
(defthm sparseint$-equal-int-sparseint$-equiv-congruence-on-x (implies (sparseint$-equiv x x-equiv) (equal (sparseint$-equal-int offset x y) (sparseint$-equal-int offset x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm sparseint$-equal-int-of-ifix-y (equal (sparseint$-equal-int offset x (ifix y)) (sparseint$-equal-int offset x y)))
Theorem:
(defthm sparseint$-equal-int-int-equiv-congruence-on-y (implies (int-equiv y y-equiv) (equal (sparseint$-equal-int offset x y) (sparseint$-equal-int offset x y-equiv))) :rule-classes :congruence)