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