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