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