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