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