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