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