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