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