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