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