(vl-modelement-fix x) is a fty fixing function.
(vl-modelement-fix x) → fty::newx
Note that in the execution this is just an inline identity function.
Function:
(defun vl-modelement-fix$inline (x) (declare (xargs :guard (vl-modelement-p x))) (let ((__function__ 'vl-modelement-fix)) (declare (ignorable __function__)) (mbe :logic (common-lisp::case (tag x) ((:vl-portdecl) (vl-portdecl-fix x)) ((:vl-assign) (vl-assign-fix x)) ((:vl-alias) (vl-alias-fix x)) ((:vl-vardecl) (vl-vardecl-fix x)) ((:vl-paramdecl) (vl-paramdecl-fix x)) ((:vl-fundecl) (vl-fundecl-fix x)) ((:vl-taskdecl) (vl-taskdecl-fix x)) ((:vl-modinst) (vl-modinst-fix x)) ((:vl-gateinst) (vl-gateinst-fix x)) ((:vl-always) (vl-always-fix x)) ((:vl-initial) (vl-initial-fix x)) ((:vl-final) (vl-final-fix x)) ((:vl-typedef) (vl-typedef-fix x)) ((:vl-import) (vl-import-fix x)) ((:vl-fwdtypedef) (vl-fwdtypedef-fix x)) ((:vl-modport) (vl-modport-fix x)) ((:vl-genvar) (vl-genvar-fix x)) ((:vl-assertion) (vl-assertion-fix x)) ((:vl-cassertion) (vl-cassertion-fix x)) ((:vl-property) (vl-property-fix x)) ((:vl-sequence) (vl-sequence-fix x)) ((:vl-clkdecl) (vl-clkdecl-fix x)) ((:vl-gclkdecl) (vl-gclkdecl-fix x)) ((:vl-defaultdisable) (vl-defaultdisable-fix x)) ((:vl-dpiimport) (vl-dpiimport-fix x)) ((:vl-dpiexport) (vl-dpiexport-fix x)) ((:vl-bind) (vl-bind-fix x)) ((:vl-class) (vl-class-fix x)) ((:vl-covergroup) (vl-covergroup-fix x)) ((:vl-elabtask) (vl-elabtask-fix x)) (otherwise (vl-letdecl-fix x))) :exec x)))
Theorem:
(defthm vl-modelement-p-of-vl-modelement-fix (b* ((fty::newx (vl-modelement-fix$inline x))) (vl-modelement-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm vl-modelement-fix-when-vl-modelement-p (implies (vl-modelement-p x) (equal (vl-modelement-fix x) x)))
Function:
(defun vl-modelement-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-modelement-p acl2::x) (vl-modelement-p acl2::y)))) (equal (vl-modelement-fix acl2::x) (vl-modelement-fix acl2::y)))
Theorem:
(defthm vl-modelement-equiv-is-an-equivalence (and (booleanp (vl-modelement-equiv x y)) (vl-modelement-equiv x x) (implies (vl-modelement-equiv x y) (vl-modelement-equiv y x)) (implies (and (vl-modelement-equiv x y) (vl-modelement-equiv y z)) (vl-modelement-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-modelement-equiv-implies-equal-vl-modelement-fix-1 (implies (vl-modelement-equiv acl2::x x-equiv) (equal (vl-modelement-fix acl2::x) (vl-modelement-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-modelement-fix-under-vl-modelement-equiv (vl-modelement-equiv (vl-modelement-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-modelement-fix-1-forward-to-vl-modelement-equiv (implies (equal (vl-modelement-fix acl2::x) acl2::y) (vl-modelement-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-modelement-fix-2-forward-to-vl-modelement-equiv (implies (equal acl2::x (vl-modelement-fix acl2::y)) (vl-modelement-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-modelement-equiv-of-vl-modelement-fix-1-forward (implies (vl-modelement-equiv (vl-modelement-fix acl2::x) acl2::y) (vl-modelement-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-modelement-equiv-of-vl-modelement-fix-2-forward (implies (vl-modelement-equiv acl2::x (vl-modelement-fix acl2::y)) (vl-modelement-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm tag-of-vl-modelement-fix-forward (or (equal (tag (vl-modelement-fix x)) :vl-portdecl) (equal (tag (vl-modelement-fix x)) :vl-assign) (equal (tag (vl-modelement-fix x)) :vl-alias) (equal (tag (vl-modelement-fix x)) :vl-vardecl) (equal (tag (vl-modelement-fix x)) :vl-paramdecl) (equal (tag (vl-modelement-fix x)) :vl-fundecl) (equal (tag (vl-modelement-fix x)) :vl-taskdecl) (equal (tag (vl-modelement-fix x)) :vl-modinst) (equal (tag (vl-modelement-fix x)) :vl-gateinst) (equal (tag (vl-modelement-fix x)) :vl-always) (equal (tag (vl-modelement-fix x)) :vl-initial) (equal (tag (vl-modelement-fix x)) :vl-final) (equal (tag (vl-modelement-fix x)) :vl-typedef) (equal (tag (vl-modelement-fix x)) :vl-import) (equal (tag (vl-modelement-fix x)) :vl-fwdtypedef) (equal (tag (vl-modelement-fix x)) :vl-modport) (equal (tag (vl-modelement-fix x)) :vl-genvar) (equal (tag (vl-modelement-fix x)) :vl-assertion) (equal (tag (vl-modelement-fix x)) :vl-cassertion) (equal (tag (vl-modelement-fix x)) :vl-property) (equal (tag (vl-modelement-fix x)) :vl-sequence) (equal (tag (vl-modelement-fix x)) :vl-clkdecl) (equal (tag (vl-modelement-fix x)) :vl-gclkdecl) (equal (tag (vl-modelement-fix x)) :vl-defaultdisable) (equal (tag (vl-modelement-fix x)) :vl-dpiimport) (equal (tag (vl-modelement-fix x)) :vl-dpiexport) (equal (tag (vl-modelement-fix x)) :vl-bind) (equal (tag (vl-modelement-fix x)) :vl-class) (equal (tag (vl-modelement-fix x)) :vl-covergroup) (equal (tag (vl-modelement-fix x)) :vl-elabtask) (equal (tag (vl-modelement-fix x)) :vl-letdecl)) :rule-classes ((:forward-chaining :trigger-terms ((tag (vl-modelement-fix x))))))