Fixing function for bvar-db-consistency-error structures.
(bvar-db-consistency-error-fix x) → new-x
Function:
(defun bvar-db-consistency-error-fix$inline (x) (declare (xargs :guard (bvar-db-consistency-error-p x))) (let ((__function__ 'bvar-db-consistency-error-fix)) (declare (ignorable __function__)) (mbe :logic (case (bvar-db-consistency-error-kind x) (:eval-error (b* ((obj (fgl-object-fix (std::prod-car (cdr x)))) (msg (std::prod-cdr (cdr x)))) (cons :eval-error (std::prod-cons obj msg)))) (:inconsistency (b* ((obj (fgl-object-fix (std::prod-car (cdr x)))) (var-val (std::prod-car (std::prod-cdr (cdr x)))) (obj-val (std::prod-cdr (std::prod-cdr (cdr x))))) (cons :inconsistency (std::prod-cons obj (std::prod-cons var-val obj-val)))))) :exec x)))
Theorem:
(defthm bvar-db-consistency-error-p-of-bvar-db-consistency-error-fix (b* ((new-x (bvar-db-consistency-error-fix$inline x))) (bvar-db-consistency-error-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm bvar-db-consistency-error-fix-when-bvar-db-consistency-error-p (implies (bvar-db-consistency-error-p x) (equal (bvar-db-consistency-error-fix x) x)))
Function:
(defun bvar-db-consistency-error-equiv$inline (x y) (declare (xargs :guard (and (bvar-db-consistency-error-p x) (bvar-db-consistency-error-p y)))) (equal (bvar-db-consistency-error-fix x) (bvar-db-consistency-error-fix y)))
Theorem:
(defthm bvar-db-consistency-error-equiv-is-an-equivalence (and (booleanp (bvar-db-consistency-error-equiv x y)) (bvar-db-consistency-error-equiv x x) (implies (bvar-db-consistency-error-equiv x y) (bvar-db-consistency-error-equiv y x)) (implies (and (bvar-db-consistency-error-equiv x y) (bvar-db-consistency-error-equiv y z)) (bvar-db-consistency-error-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm bvar-db-consistency-error-equiv-implies-equal-bvar-db-consistency-error-fix-1 (implies (bvar-db-consistency-error-equiv x x-equiv) (equal (bvar-db-consistency-error-fix x) (bvar-db-consistency-error-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm bvar-db-consistency-error-fix-under-bvar-db-consistency-error-equiv (bvar-db-consistency-error-equiv (bvar-db-consistency-error-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-bvar-db-consistency-error-fix-1-forward-to-bvar-db-consistency-error-equiv (implies (equal (bvar-db-consistency-error-fix x) y) (bvar-db-consistency-error-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-bvar-db-consistency-error-fix-2-forward-to-bvar-db-consistency-error-equiv (implies (equal x (bvar-db-consistency-error-fix y)) (bvar-db-consistency-error-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm bvar-db-consistency-error-equiv-of-bvar-db-consistency-error-fix-1-forward (implies (bvar-db-consistency-error-equiv (bvar-db-consistency-error-fix x) y) (bvar-db-consistency-error-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm bvar-db-consistency-error-equiv-of-bvar-db-consistency-error-fix-2-forward (implies (bvar-db-consistency-error-equiv x (bvar-db-consistency-error-fix y)) (bvar-db-consistency-error-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm bvar-db-consistency-error-kind$inline-of-bvar-db-consistency-error-fix-x (equal (bvar-db-consistency-error-kind$inline (bvar-db-consistency-error-fix x)) (bvar-db-consistency-error-kind$inline x)))
Theorem:
(defthm bvar-db-consistency-error-kind$inline-bvar-db-consistency-error-equiv-congruence-on-x (implies (bvar-db-consistency-error-equiv x x-equiv) (equal (bvar-db-consistency-error-kind$inline x) (bvar-db-consistency-error-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-bvar-db-consistency-error-fix (consp (bvar-db-consistency-error-fix x)) :rule-classes :type-prescription)