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