Fixing function for filepath-option structures.
(filepath-option-fix x) → new-x
Function:
(defun filepath-option-fix$inline (x) (declare (xargs :guard (filepath-optionp x))) (let ((__function__ 'filepath-option-fix)) (declare (ignorable __function__)) (mbe :logic (cond ((not x) nil) (t (b* ((fty::val (c$::filepath-fix x))) fty::val))) :exec x)))
Theorem:
(defthm filepath-optionp-of-filepath-option-fix (b* ((new-x (filepath-option-fix$inline x))) (filepath-optionp new-x)) :rule-classes :rewrite)
Theorem:
(defthm filepath-option-fix-when-filepath-optionp (implies (filepath-optionp x) (equal (filepath-option-fix x) x)))
Function:
(defun filepath-option-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (filepath-optionp acl2::x) (filepath-optionp acl2::y)))) (equal (filepath-option-fix acl2::x) (filepath-option-fix acl2::y)))
Theorem:
(defthm filepath-option-equiv-is-an-equivalence (and (booleanp (filepath-option-equiv x y)) (filepath-option-equiv x x) (implies (filepath-option-equiv x y) (filepath-option-equiv y x)) (implies (and (filepath-option-equiv x y) (filepath-option-equiv y z)) (filepath-option-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm filepath-option-equiv-implies-equal-filepath-option-fix-1 (implies (filepath-option-equiv acl2::x x-equiv) (equal (filepath-option-fix acl2::x) (filepath-option-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm filepath-option-fix-under-filepath-option-equiv (filepath-option-equiv (filepath-option-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-filepath-option-fix-1-forward-to-filepath-option-equiv (implies (equal (filepath-option-fix acl2::x) acl2::y) (filepath-option-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-filepath-option-fix-2-forward-to-filepath-option-equiv (implies (equal acl2::x (filepath-option-fix acl2::y)) (filepath-option-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm filepath-option-equiv-of-filepath-option-fix-1-forward (implies (filepath-option-equiv (filepath-option-fix acl2::x) acl2::y) (filepath-option-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm filepath-option-equiv-of-filepath-option-fix-2-forward (implies (filepath-option-equiv acl2::x (filepath-option-fix acl2::y)) (filepath-option-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)