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