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