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