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