Fixtype of signed bytes of size 2.
Function:
(defun sbyte2-equiv$inline (x y) (declare (xargs :guard (and (sbyte2p x) (sbyte2p y)))) (equal (sbyte2-fix x) (sbyte2-fix y)))
Theorem:
(defthm sbyte2-equiv-is-an-equivalence (and (booleanp (sbyte2-equiv x y)) (sbyte2-equiv x x) (implies (sbyte2-equiv x y) (sbyte2-equiv y x)) (implies (and (sbyte2-equiv x y) (sbyte2-equiv y z)) (sbyte2-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm sbyte2-equiv-implies-equal-sbyte2-fix-1 (implies (sbyte2-equiv x x-equiv) (equal (sbyte2-fix x) (sbyte2-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm sbyte2-fix-under-sbyte2-equiv (sbyte2-equiv (sbyte2-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-sbyte2-fix-1-forward-to-sbyte2-equiv (implies (equal (sbyte2-fix x) y) (sbyte2-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-sbyte2-fix-2-forward-to-sbyte2-equiv (implies (equal x (sbyte2-fix y)) (sbyte2-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm sbyte2-equiv-of-sbyte2-fix-1-forward (implies (sbyte2-equiv (sbyte2-fix x) y) (sbyte2-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm sbyte2-equiv-of-sbyte2-fix-2-forward (implies (sbyte2-equiv x (sbyte2-fix y)) (sbyte2-equiv x y)) :rule-classes :forward-chaining)