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