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