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