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