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