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