Basic equivalence relation for cinteger structures.
Function:
(defun cinteger-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (cintegerp acl2::x) (cintegerp acl2::y)))) (equal (cinteger-fix acl2::x) (cinteger-fix acl2::y)))
Theorem:
(defthm cinteger-equiv-is-an-equivalence (and (booleanp (cinteger-equiv x y)) (cinteger-equiv x x) (implies (cinteger-equiv x y) (cinteger-equiv y x)) (implies (and (cinteger-equiv x y) (cinteger-equiv y z)) (cinteger-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm cinteger-equiv-implies-equal-cinteger-fix-1 (implies (cinteger-equiv acl2::x x-equiv) (equal (cinteger-fix acl2::x) (cinteger-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm cinteger-fix-under-cinteger-equiv (cinteger-equiv (cinteger-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-cinteger-fix-1-forward-to-cinteger-equiv (implies (equal (cinteger-fix acl2::x) acl2::y) (cinteger-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-cinteger-fix-2-forward-to-cinteger-equiv (implies (equal acl2::x (cinteger-fix acl2::y)) (cinteger-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm cinteger-equiv-of-cinteger-fix-1-forward (implies (cinteger-equiv (cinteger-fix acl2::x) acl2::y) (cinteger-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm cinteger-equiv-of-cinteger-fix-2-forward (implies (cinteger-equiv acl2::x (cinteger-fix acl2::y)) (cinteger-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)