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