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