Fixing function for path-result structures.
(path-result-fix acl2::x) → new-x
Function:
(defun path-result-fix$inline (acl2::x) (declare (xargs :guard (path-resultp acl2::x))) (let ((__function__ 'path-result-fix)) (declare (ignorable __function__)) (mbe :logic (case (path-result-kind acl2::x) (:ok (b* ((get (path-fix acl2::x))) get)) (:err (b* ((get (fty::reserr-fix acl2::x))) get))) :exec acl2::x)))
Theorem:
(defthm path-resultp-of-path-result-fix (b* ((new-x (path-result-fix$inline acl2::x))) (path-resultp new-x)) :rule-classes :rewrite)
Theorem:
(defthm path-result-fix-when-path-resultp (implies (path-resultp acl2::x) (equal (path-result-fix acl2::x) acl2::x)))
Function:
(defun path-result-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (path-resultp acl2::x) (path-resultp acl2::y)))) (equal (path-result-fix acl2::x) (path-result-fix acl2::y)))
Theorem:
(defthm path-result-equiv-is-an-equivalence (and (booleanp (path-result-equiv x y)) (path-result-equiv x x) (implies (path-result-equiv x y) (path-result-equiv y x)) (implies (and (path-result-equiv x y) (path-result-equiv y z)) (path-result-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm path-result-equiv-implies-equal-path-result-fix-1 (implies (path-result-equiv acl2::x x-equiv) (equal (path-result-fix acl2::x) (path-result-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm path-result-fix-under-path-result-equiv (path-result-equiv (path-result-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-path-result-fix-1-forward-to-path-result-equiv (implies (equal (path-result-fix acl2::x) acl2::y) (path-result-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-path-result-fix-2-forward-to-path-result-equiv (implies (equal acl2::x (path-result-fix acl2::y)) (path-result-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm path-result-equiv-of-path-result-fix-1-forward (implies (path-result-equiv (path-result-fix acl2::x) acl2::y) (path-result-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm path-result-equiv-of-path-result-fix-2-forward (implies (path-result-equiv acl2::x (path-result-fix acl2::y)) (path-result-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm path-result-kind$inline-of-path-result-fix-x (equal (path-result-kind$inline (path-result-fix acl2::x)) (path-result-kind$inline acl2::x)))
Theorem:
(defthm path-result-kind$inline-path-result-equiv-congruence-on-x (implies (path-result-equiv acl2::x x-equiv) (equal (path-result-kind$inline acl2::x) (path-result-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-path-result-fix (consp (path-result-fix acl2::x)) :rule-classes :type-prescription)