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