Subtraction of a value of type
Function:
(defun sub-sllong-sllong (x y) (declare (xargs :guard (and (sllongp x) (sllongp y) (sub-sllong-sllong-okp x y)))) (sllong-from-integer (- (integer-from-sllong x) (integer-from-sllong y))))
Theorem:
(defthm sllongp-of-sub-sllong-sllong (sllongp (sub-sllong-sllong x y)))
Theorem:
(defthm sub-sllong-sllong-of-sllong-fix-x (equal (sub-sllong-sllong (sllong-fix x) y) (sub-sllong-sllong x y)))
Theorem:
(defthm sub-sllong-sllong-sllong-equiv-congruence-on-x (implies (sllong-equiv x x-equiv) (equal (sub-sllong-sllong x y) (sub-sllong-sllong x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm sub-sllong-sllong-of-sllong-fix-y (equal (sub-sllong-sllong x (sllong-fix y)) (sub-sllong-sllong x y)))
Theorem:
(defthm sub-sllong-sllong-sllong-equiv-congruence-on-y (implies (sllong-equiv y y-equiv) (equal (sub-sllong-sllong x y) (sub-sllong-sllong x y-equiv))) :rule-classes :congruence)