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