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