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