Fixing function for plain-string structures.
(plain-string-fix x) → new-x
Function:
(defun plain-string-fix$inline (x) (declare (xargs :guard (plain-stringp x))) (let ((__function__ 'plain-string-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((content (string-element-list-fix (cdr (std::da-nth 0 (cdr x))))) (double-quote-p (acl2::bool-fix (cdr (std::da-nth 1 (cdr x)))))) (cons :plain-string (list (cons 'content content) (cons 'double-quote-p double-quote-p)))) :exec x)))
Theorem:
(defthm plain-stringp-of-plain-string-fix (b* ((new-x (plain-string-fix$inline x))) (plain-stringp new-x)) :rule-classes :rewrite)
Theorem:
(defthm plain-string-fix-when-plain-stringp (implies (plain-stringp x) (equal (plain-string-fix x) x)))
Function:
(defun plain-string-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (plain-stringp acl2::x) (plain-stringp acl2::y)))) (equal (plain-string-fix acl2::x) (plain-string-fix acl2::y)))
Theorem:
(defthm plain-string-equiv-is-an-equivalence (and (booleanp (plain-string-equiv x y)) (plain-string-equiv x x) (implies (plain-string-equiv x y) (plain-string-equiv y x)) (implies (and (plain-string-equiv x y) (plain-string-equiv y z)) (plain-string-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm plain-string-equiv-implies-equal-plain-string-fix-1 (implies (plain-string-equiv acl2::x x-equiv) (equal (plain-string-fix acl2::x) (plain-string-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm plain-string-fix-under-plain-string-equiv (plain-string-equiv (plain-string-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-plain-string-fix-1-forward-to-plain-string-equiv (implies (equal (plain-string-fix acl2::x) acl2::y) (plain-string-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-plain-string-fix-2-forward-to-plain-string-equiv (implies (equal acl2::x (plain-string-fix acl2::y)) (plain-string-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm plain-string-equiv-of-plain-string-fix-1-forward (implies (plain-string-equiv (plain-string-fix acl2::x) acl2::y) (plain-string-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm plain-string-equiv-of-plain-string-fix-2-forward (implies (plain-string-equiv acl2::x (plain-string-fix acl2::y)) (plain-string-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)