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