Fixing function for exec-outcome structures.
(exec-outcome-fix x) → new-x
Function:
(defun exec-outcome-fix$inline (x) (declare (xargs :guard (exec-outcome-p x))) (let ((__function__ 'exec-outcome-fix)) (declare (ignorable __function__)) (mbe :logic (case (exec-outcome-kind x) (:terminating (b* ((result (value-fix (std::da-nth 0 (cdr x))))) (cons :terminating (list result)))) (:error (cons :error (list))) (:nonterminating (cons :nonterminating (list)))) :exec x)))
Theorem:
(defthm exec-outcome-p-of-exec-outcome-fix (b* ((new-x (exec-outcome-fix$inline x))) (exec-outcome-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm exec-outcome-fix-when-exec-outcome-p (implies (exec-outcome-p x) (equal (exec-outcome-fix x) x)))
Function:
(defun exec-outcome-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (exec-outcome-p acl2::x) (exec-outcome-p acl2::y)))) (equal (exec-outcome-fix acl2::x) (exec-outcome-fix acl2::y)))
Theorem:
(defthm exec-outcome-equiv-is-an-equivalence (and (booleanp (exec-outcome-equiv x y)) (exec-outcome-equiv x x) (implies (exec-outcome-equiv x y) (exec-outcome-equiv y x)) (implies (and (exec-outcome-equiv x y) (exec-outcome-equiv y z)) (exec-outcome-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm exec-outcome-equiv-implies-equal-exec-outcome-fix-1 (implies (exec-outcome-equiv acl2::x x-equiv) (equal (exec-outcome-fix acl2::x) (exec-outcome-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm exec-outcome-fix-under-exec-outcome-equiv (exec-outcome-equiv (exec-outcome-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-exec-outcome-fix-1-forward-to-exec-outcome-equiv (implies (equal (exec-outcome-fix acl2::x) acl2::y) (exec-outcome-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-exec-outcome-fix-2-forward-to-exec-outcome-equiv (implies (equal acl2::x (exec-outcome-fix acl2::y)) (exec-outcome-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm exec-outcome-equiv-of-exec-outcome-fix-1-forward (implies (exec-outcome-equiv (exec-outcome-fix acl2::x) acl2::y) (exec-outcome-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm exec-outcome-equiv-of-exec-outcome-fix-2-forward (implies (exec-outcome-equiv acl2::x (exec-outcome-fix acl2::y)) (exec-outcome-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm exec-outcome-kind$inline-of-exec-outcome-fix-x (equal (exec-outcome-kind$inline (exec-outcome-fix x)) (exec-outcome-kind$inline x)))
Theorem:
(defthm exec-outcome-kind$inline-exec-outcome-equiv-congruence-on-x (implies (exec-outcome-equiv x x-equiv) (equal (exec-outcome-kind$inline x) (exec-outcome-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-exec-outcome-fix (consp (exec-outcome-fix x)) :rule-classes :type-prescription)