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