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