Fixing function for simple-escape structures.
(simple-escape-fix x) → new-x
Function:
(defun simple-escape-fix$inline (x) (declare (xargs :guard (simple-escapep x))) (let ((__function__ 'simple-escape-fix)) (declare (ignorable __function__)) (mbe :logic (case (simple-escape-kind x) (:squote (cons :squote (list))) (:dquote (cons :dquote (list))) (:qmark (cons :qmark (list))) (:bslash (cons :bslash (list))) (:a (cons :a (list))) (:b (cons :b (list))) (:f (cons :f (list))) (:n (cons :n (list))) (:r (cons :r (list))) (:t (cons :t (list))) (:v (cons :v (list))) (:percent (cons :percent (list)))) :exec x)))
Theorem:
(defthm simple-escapep-of-simple-escape-fix (b* ((new-x (simple-escape-fix$inline x))) (simple-escapep new-x)) :rule-classes :rewrite)
Theorem:
(defthm simple-escape-fix-when-simple-escapep (implies (simple-escapep x) (equal (simple-escape-fix x) x)))
Function:
(defun simple-escape-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (simple-escapep acl2::x) (simple-escapep acl2::y)))) (equal (simple-escape-fix acl2::x) (simple-escape-fix acl2::y)))
Theorem:
(defthm simple-escape-equiv-is-an-equivalence (and (booleanp (simple-escape-equiv x y)) (simple-escape-equiv x x) (implies (simple-escape-equiv x y) (simple-escape-equiv y x)) (implies (and (simple-escape-equiv x y) (simple-escape-equiv y z)) (simple-escape-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm simple-escape-equiv-implies-equal-simple-escape-fix-1 (implies (simple-escape-equiv acl2::x x-equiv) (equal (simple-escape-fix acl2::x) (simple-escape-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm simple-escape-fix-under-simple-escape-equiv (simple-escape-equiv (simple-escape-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-simple-escape-fix-1-forward-to-simple-escape-equiv (implies (equal (simple-escape-fix acl2::x) acl2::y) (simple-escape-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-simple-escape-fix-2-forward-to-simple-escape-equiv (implies (equal acl2::x (simple-escape-fix acl2::y)) (simple-escape-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm simple-escape-equiv-of-simple-escape-fix-1-forward (implies (simple-escape-equiv (simple-escape-fix acl2::x) acl2::y) (simple-escape-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm simple-escape-equiv-of-simple-escape-fix-2-forward (implies (simple-escape-equiv acl2::x (simple-escape-fix acl2::y)) (simple-escape-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm simple-escape-kind$inline-of-simple-escape-fix-x (equal (simple-escape-kind$inline (simple-escape-fix x)) (simple-escape-kind$inline x)))
Theorem:
(defthm simple-escape-kind$inline-simple-escape-equiv-congruence-on-x (implies (simple-escape-equiv x x-equiv) (equal (simple-escape-kind$inline x) (simple-escape-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-simple-escape-fix (consp (simple-escape-fix x)) :rule-classes :type-prescription)