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