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