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