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