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