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