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