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