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