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