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