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