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