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