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