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