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