Subtraction of a value of type
Function:
(defun sub-ushort-sshort (x y) (declare (xargs :guard (and (ushortp x) (sshortp y) (sub-ushort-sshort-okp x y)))) (sub-sint-sint (sint-from-ushort x) (sint-from-sshort y)))
Theorem:
(defthm sintp-of-sub-ushort-sshort (sintp (sub-ushort-sshort x y)))
Theorem:
(defthm sub-ushort-sshort-of-ushort-fix-x (equal (sub-ushort-sshort (ushort-fix x) y) (sub-ushort-sshort x y)))
Theorem:
(defthm sub-ushort-sshort-ushort-equiv-congruence-on-x (implies (ushort-equiv x x-equiv) (equal (sub-ushort-sshort x y) (sub-ushort-sshort x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm sub-ushort-sshort-of-sshort-fix-y (equal (sub-ushort-sshort x (sshort-fix y)) (sub-ushort-sshort x y)))
Theorem:
(defthm sub-ushort-sshort-sshort-equiv-congruence-on-y (implies (sshort-equiv y y-equiv) (equal (sub-ushort-sshort x y) (sub-ushort-sshort x y-equiv))) :rule-classes :congruence)