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