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