Subtract two sparseints.
(sparseint-binary-minus x y) → minus
Function:
(defun sparseint-binary-minus (x y) (declare (xargs :guard (and (sparseint-p x) (sparseint-p y)))) (let ((__function__ 'sparseint-binary-minus)) (declare (ignorable __function__)) (sparseint$-binary-minus (sparseint-fix x) (sparseint-fix y))))
Theorem:
(defthm sparseint-p-of-sparseint-binary-minus (b* ((minus (sparseint-binary-minus x y))) (sparseint-p minus)) :rule-classes :rewrite)
Theorem:
(defthm sparseint-val-of-sparseint-binary-minus (b* ((?minus (sparseint-binary-minus x y))) (equal (sparseint-val minus) (- (sparseint-val x) (sparseint-val y)))))
Theorem:
(defthm sparseint-binary-minus-of-sparseint-fix-x (equal (sparseint-binary-minus (sparseint-fix x) y) (sparseint-binary-minus x y)))
Theorem:
(defthm sparseint-binary-minus-sparseint-equiv-congruence-on-x (implies (sparseint-equiv x x-equiv) (equal (sparseint-binary-minus x y) (sparseint-binary-minus x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm sparseint-binary-minus-of-sparseint-fix-y (equal (sparseint-binary-minus x (sparseint-fix y)) (sparseint-binary-minus x y)))
Theorem:
(defthm sparseint-binary-minus-sparseint-equiv-congruence-on-y (implies (sparseint-equiv y y-equiv) (equal (sparseint-binary-minus x y) (sparseint-binary-minus x y-equiv))) :rule-classes :congruence)