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