Fixtype of ACL2 integers in the range of type
Function:
(defun uchar-integer-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (uchar-integerp acl2::x) (uchar-integerp acl2::y)))) (equal (uchar-integer-fix acl2::x) (uchar-integer-fix acl2::y)))
Theorem:
(defthm uchar-integer-equiv-is-an-equivalence (and (booleanp (uchar-integer-equiv x y)) (uchar-integer-equiv x x) (implies (uchar-integer-equiv x y) (uchar-integer-equiv y x)) (implies (and (uchar-integer-equiv x y) (uchar-integer-equiv y z)) (uchar-integer-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm uchar-integer-equiv-implies-equal-uchar-integer-fix-1 (implies (uchar-integer-equiv acl2::x x-equiv) (equal (uchar-integer-fix acl2::x) (uchar-integer-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm uchar-integer-fix-under-uchar-integer-equiv (uchar-integer-equiv (uchar-integer-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-uchar-integer-fix-1-forward-to-uchar-integer-equiv (implies (equal (uchar-integer-fix acl2::x) acl2::y) (uchar-integer-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-uchar-integer-fix-2-forward-to-uchar-integer-equiv (implies (equal acl2::x (uchar-integer-fix acl2::y)) (uchar-integer-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm uchar-integer-equiv-of-uchar-integer-fix-1-forward (implies (uchar-integer-equiv (uchar-integer-fix acl2::x) acl2::y) (uchar-integer-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm uchar-integer-equiv-of-uchar-integer-fix-2-forward (implies (uchar-integer-equiv acl2::x (uchar-integer-fix acl2::y)) (uchar-integer-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)