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