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