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* ((path-wo-ext (str-fix (cdr (std::da-nth 0 (cdr x))))) (dot-h (file-option-fix (cdr (std::da-nth 1 (cdr x))))) (dot-c (file-fix (cdr (std::da-nth 2 (cdr x)))))) (cons :fileset (list (cons 'path-wo-ext path-wo-ext) (cons 'dot-h dot-h) (cons 'dot-c dot-c)))) :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)