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