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