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