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