Fixing function for vl-elabinstruction structures.
(vl-elabinstruction-fix x) → new-x
Function:
(defun vl-elabinstruction-fix$inline (x) (declare (xargs :guard (vl-elabinstruction-p x))) (let ((__function__ 'vl-elabinstruction-fix)) (declare (ignorable __function__)) (mbe :logic (common-lisp::case (vl-elabinstruction-kind x) (:pop (b* ((levels (nfix (std::da-nth 0 (cdr x))))) (cons :pop (list levels)))) (:root (cons :root (list))) (:push-named (b* ((key (vl-elabkey-fix (std::da-nth 0 (cdr x))))) (cons :push-named (list key)))) (:push-anon (b* ((scope (vl-elabscope-fix (std::da-nth 0 (cdr x))))) (cons :push-anon (list scope))))) :exec x)))
Theorem:
(defthm vl-elabinstruction-p-of-vl-elabinstruction-fix (b* ((new-x (vl-elabinstruction-fix$inline x))) (vl-elabinstruction-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-elabinstruction-fix-when-vl-elabinstruction-p (implies (vl-elabinstruction-p x) (equal (vl-elabinstruction-fix x) x)))
Function:
(defun vl-elabinstruction-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-elabinstruction-p acl2::x) (vl-elabinstruction-p acl2::y)))) (equal (vl-elabinstruction-fix acl2::x) (vl-elabinstruction-fix acl2::y)))
Theorem:
(defthm vl-elabinstruction-equiv-is-an-equivalence (and (booleanp (vl-elabinstruction-equiv x y)) (vl-elabinstruction-equiv x x) (implies (vl-elabinstruction-equiv x y) (vl-elabinstruction-equiv y x)) (implies (and (vl-elabinstruction-equiv x y) (vl-elabinstruction-equiv y z)) (vl-elabinstruction-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-elabinstruction-equiv-implies-equal-vl-elabinstruction-fix-1 (implies (vl-elabinstruction-equiv acl2::x x-equiv) (equal (vl-elabinstruction-fix acl2::x) (vl-elabinstruction-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-elabinstruction-fix-under-vl-elabinstruction-equiv (vl-elabinstruction-equiv (vl-elabinstruction-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-elabinstruction-fix-1-forward-to-vl-elabinstruction-equiv (implies (equal (vl-elabinstruction-fix acl2::x) acl2::y) (vl-elabinstruction-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-elabinstruction-fix-2-forward-to-vl-elabinstruction-equiv (implies (equal acl2::x (vl-elabinstruction-fix acl2::y)) (vl-elabinstruction-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-elabinstruction-equiv-of-vl-elabinstruction-fix-1-forward (implies (vl-elabinstruction-equiv (vl-elabinstruction-fix acl2::x) acl2::y) (vl-elabinstruction-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-elabinstruction-equiv-of-vl-elabinstruction-fix-2-forward (implies (vl-elabinstruction-equiv acl2::x (vl-elabinstruction-fix acl2::y)) (vl-elabinstruction-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-elabinstruction-kind$inline-of-vl-elabinstruction-fix-x (equal (vl-elabinstruction-kind$inline (vl-elabinstruction-fix x)) (vl-elabinstruction-kind$inline x)))
Theorem:
(defthm vl-elabinstruction-kind$inline-vl-elabinstruction-equiv-congruence-on-x (implies (vl-elabinstruction-equiv x x-equiv) (equal (vl-elabinstruction-kind$inline x) (vl-elabinstruction-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-vl-elabinstruction-fix (consp (vl-elabinstruction-fix x)) :rule-classes :type-prescription)