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