Fixing function for var-defstatus structures.
(var-defstatus-fix x) → new-x
Function:
(defun var-defstatus-fix$inline (x) (declare (xargs :guard (var-defstatusp x))) (let ((__function__ 'var-defstatus-fix)) (declare (ignorable __function__)) (mbe :logic (case (var-defstatus-kind x) (:undefined (cons :undefined (list))) (:tentative (cons :tentative (list))) (:defined (cons :defined (list)))) :exec x)))
Theorem:
(defthm var-defstatusp-of-var-defstatus-fix (b* ((new-x (var-defstatus-fix$inline x))) (var-defstatusp new-x)) :rule-classes :rewrite)
Theorem:
(defthm var-defstatus-fix-when-var-defstatusp (implies (var-defstatusp x) (equal (var-defstatus-fix x) x)))
Function:
(defun var-defstatus-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (var-defstatusp acl2::x) (var-defstatusp acl2::y)))) (equal (var-defstatus-fix acl2::x) (var-defstatus-fix acl2::y)))
Theorem:
(defthm var-defstatus-equiv-is-an-equivalence (and (booleanp (var-defstatus-equiv x y)) (var-defstatus-equiv x x) (implies (var-defstatus-equiv x y) (var-defstatus-equiv y x)) (implies (and (var-defstatus-equiv x y) (var-defstatus-equiv y z)) (var-defstatus-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm var-defstatus-equiv-implies-equal-var-defstatus-fix-1 (implies (var-defstatus-equiv acl2::x x-equiv) (equal (var-defstatus-fix acl2::x) (var-defstatus-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm var-defstatus-fix-under-var-defstatus-equiv (var-defstatus-equiv (var-defstatus-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-var-defstatus-fix-1-forward-to-var-defstatus-equiv (implies (equal (var-defstatus-fix acl2::x) acl2::y) (var-defstatus-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-var-defstatus-fix-2-forward-to-var-defstatus-equiv (implies (equal acl2::x (var-defstatus-fix acl2::y)) (var-defstatus-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm var-defstatus-equiv-of-var-defstatus-fix-1-forward (implies (var-defstatus-equiv (var-defstatus-fix acl2::x) acl2::y) (var-defstatus-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm var-defstatus-equiv-of-var-defstatus-fix-2-forward (implies (var-defstatus-equiv acl2::x (var-defstatus-fix acl2::y)) (var-defstatus-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm var-defstatus-kind$inline-of-var-defstatus-fix-x (equal (var-defstatus-kind$inline (var-defstatus-fix x)) (var-defstatus-kind$inline x)))
Theorem:
(defthm var-defstatus-kind$inline-var-defstatus-equiv-congruence-on-x (implies (var-defstatus-equiv x x-equiv) (equal (var-defstatus-kind$inline x) (var-defstatus-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-var-defstatus-fix (consp (var-defstatus-fix x)) :rule-classes :type-prescription)