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