(vl-scopeitem-fix x) is a fty fixing function.
(vl-scopeitem-fix x) → fty::newx
Note that in the execution this is just an inline identity function.
Function:
(defun vl-scopeitem-fix$inline (x) (declare (xargs :guard (vl-scopeitem-p x))) (let ((__function__ 'vl-scopeitem-fix)) (declare (ignorable __function__)) (mbe :logic (common-lisp::case (tag x) ((:vl-modinst) (vl-modinst-fix x)) ((:vl-gateinst) (vl-gateinst-fix x)) ((:vl-genvar) (vl-genvar-fix x)) ((:vl-genbase :vl-genbegin :vl-genif :vl-gencase :vl-genloop :vl-genarray) (vl-genelement-fix x)) ((:vl-interfaceport) (vl-interfaceport-fix x)) ((:vl-modport) (vl-modport-fix x)) ((:vl-paramdecl) (vl-paramdecl-fix x)) ((:vl-vardecl) (vl-vardecl-fix x)) ((:vl-fundecl) (vl-fundecl-fix x)) ((:vl-taskdecl) (vl-taskdecl-fix x)) ((:vl-typedef) (vl-typedef-fix x)) (otherwise (vl-dpiimport-fix x))) :exec x)))
Theorem:
(defthm vl-scopeitem-p-of-vl-scopeitem-fix (b* ((fty::newx (vl-scopeitem-fix$inline x))) (vl-scopeitem-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopeitem-fix-when-vl-scopeitem-p (implies (vl-scopeitem-p x) (equal (vl-scopeitem-fix x) x)))
Function:
(defun vl-scopeitem-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-scopeitem-p acl2::x) (vl-scopeitem-p acl2::y)))) (equal (vl-scopeitem-fix acl2::x) (vl-scopeitem-fix acl2::y)))
Theorem:
(defthm vl-scopeitem-equiv-is-an-equivalence (and (booleanp (vl-scopeitem-equiv x y)) (vl-scopeitem-equiv x x) (implies (vl-scopeitem-equiv x y) (vl-scopeitem-equiv y x)) (implies (and (vl-scopeitem-equiv x y) (vl-scopeitem-equiv y z)) (vl-scopeitem-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-scopeitem-equiv-implies-equal-vl-scopeitem-fix-1 (implies (vl-scopeitem-equiv acl2::x x-equiv) (equal (vl-scopeitem-fix acl2::x) (vl-scopeitem-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-scopeitem-fix-under-vl-scopeitem-equiv (vl-scopeitem-equiv (vl-scopeitem-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-scopeitem-fix-1-forward-to-vl-scopeitem-equiv (implies (equal (vl-scopeitem-fix acl2::x) acl2::y) (vl-scopeitem-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-scopeitem-fix-2-forward-to-vl-scopeitem-equiv (implies (equal acl2::x (vl-scopeitem-fix acl2::y)) (vl-scopeitem-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-scopeitem-equiv-of-vl-scopeitem-fix-1-forward (implies (vl-scopeitem-equiv (vl-scopeitem-fix acl2::x) acl2::y) (vl-scopeitem-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-scopeitem-equiv-of-vl-scopeitem-fix-2-forward (implies (vl-scopeitem-equiv acl2::x (vl-scopeitem-fix acl2::y)) (vl-scopeitem-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm tag-of-vl-scopeitem-fix-forward (or (equal (tag (vl-scopeitem-fix x)) :vl-modinst) (equal (tag (vl-scopeitem-fix x)) :vl-gateinst) (equal (tag (vl-scopeitem-fix x)) :vl-genvar) (equal (tag (vl-scopeitem-fix x)) :vl-genbase) (equal (tag (vl-scopeitem-fix x)) :vl-genbegin) (equal (tag (vl-scopeitem-fix x)) :vl-genif) (equal (tag (vl-scopeitem-fix x)) :vl-gencase) (equal (tag (vl-scopeitem-fix x)) :vl-genloop) (equal (tag (vl-scopeitem-fix x)) :vl-genarray) (equal (tag (vl-scopeitem-fix x)) :vl-interfaceport) (equal (tag (vl-scopeitem-fix x)) :vl-modport) (equal (tag (vl-scopeitem-fix x)) :vl-paramdecl) (equal (tag (vl-scopeitem-fix x)) :vl-vardecl) (equal (tag (vl-scopeitem-fix x)) :vl-fundecl) (equal (tag (vl-scopeitem-fix x)) :vl-taskdecl) (equal (tag (vl-scopeitem-fix x)) :vl-typedef) (equal (tag (vl-scopeitem-fix x)) :vl-dpiimport)) :rule-classes ((:forward-chaining :trigger-terms ((tag (vl-scopeitem-fix x))))))