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