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