(vl-ctxelement-fix x) is a fty fixing function.
(vl-ctxelement-fix x) → fty::newx
Note that in the execution this is just an inline identity function.
Function:
(defun vl-ctxelement-fix$inline (x) (declare (xargs :guard (vl-ctxelement-p x))) (let ((__function__ 'vl-ctxelement-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-interfaceport) (vl-interfaceport-fix x)) ((:vl-regularport) (vl-regularport-fix x)) ((:vl-genbase :vl-genbegin :vl-genif :vl-gencase :vl-genloop :vl-genarray) (vl-genelement-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-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)) (otherwise (vl-elabtask-fix x))) :exec x)))
Theorem:
(defthm vl-ctxelement-p-of-vl-ctxelement-fix (b* ((fty::newx (vl-ctxelement-fix$inline x))) (vl-ctxelement-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm vl-ctxelement-fix-when-vl-ctxelement-p (implies (vl-ctxelement-p x) (equal (vl-ctxelement-fix x) x)))
Function:
(defun vl-ctxelement-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-ctxelement-p acl2::x) (vl-ctxelement-p acl2::y)))) (equal (vl-ctxelement-fix acl2::x) (vl-ctxelement-fix acl2::y)))
Theorem:
(defthm vl-ctxelement-equiv-is-an-equivalence (and (booleanp (vl-ctxelement-equiv x y)) (vl-ctxelement-equiv x x) (implies (vl-ctxelement-equiv x y) (vl-ctxelement-equiv y x)) (implies (and (vl-ctxelement-equiv x y) (vl-ctxelement-equiv y z)) (vl-ctxelement-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-ctxelement-equiv-implies-equal-vl-ctxelement-fix-1 (implies (vl-ctxelement-equiv acl2::x x-equiv) (equal (vl-ctxelement-fix acl2::x) (vl-ctxelement-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-ctxelement-fix-under-vl-ctxelement-equiv (vl-ctxelement-equiv (vl-ctxelement-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-ctxelement-fix-1-forward-to-vl-ctxelement-equiv (implies (equal (vl-ctxelement-fix acl2::x) acl2::y) (vl-ctxelement-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-ctxelement-fix-2-forward-to-vl-ctxelement-equiv (implies (equal acl2::x (vl-ctxelement-fix acl2::y)) (vl-ctxelement-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-ctxelement-equiv-of-vl-ctxelement-fix-1-forward (implies (vl-ctxelement-equiv (vl-ctxelement-fix acl2::x) acl2::y) (vl-ctxelement-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-ctxelement-equiv-of-vl-ctxelement-fix-2-forward (implies (vl-ctxelement-equiv acl2::x (vl-ctxelement-fix acl2::y)) (vl-ctxelement-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm tag-of-vl-ctxelement-fix-forward (or (equal (tag (vl-ctxelement-fix x)) :vl-portdecl) (equal (tag (vl-ctxelement-fix x)) :vl-assign) (equal (tag (vl-ctxelement-fix x)) :vl-alias) (equal (tag (vl-ctxelement-fix x)) :vl-vardecl) (equal (tag (vl-ctxelement-fix x)) :vl-paramdecl) (equal (tag (vl-ctxelement-fix x)) :vl-fundecl) (equal (tag (vl-ctxelement-fix x)) :vl-taskdecl) (equal (tag (vl-ctxelement-fix x)) :vl-modinst) (equal (tag (vl-ctxelement-fix x)) :vl-gateinst) (equal (tag (vl-ctxelement-fix x)) :vl-always) (equal (tag (vl-ctxelement-fix x)) :vl-initial) (equal (tag (vl-ctxelement-fix x)) :vl-final) (equal (tag (vl-ctxelement-fix x)) :vl-typedef) (equal (tag (vl-ctxelement-fix x)) :vl-import) (equal (tag (vl-ctxelement-fix x)) :vl-fwdtypedef) (equal (tag (vl-ctxelement-fix x)) :vl-modport) (equal (tag (vl-ctxelement-fix x)) :vl-interfaceport) (equal (tag (vl-ctxelement-fix x)) :vl-regularport) (equal (tag (vl-ctxelement-fix x)) :vl-genbase) (equal (tag (vl-ctxelement-fix x)) :vl-genbegin) (equal (tag (vl-ctxelement-fix x)) :vl-genif) (equal (tag (vl-ctxelement-fix x)) :vl-gencase) (equal (tag (vl-ctxelement-fix x)) :vl-genloop) (equal (tag (vl-ctxelement-fix x)) :vl-genarray) (equal (tag (vl-ctxelement-fix x)) :vl-assertion) (equal (tag (vl-ctxelement-fix x)) :vl-cassertion) (equal (tag (vl-ctxelement-fix x)) :vl-property) (equal (tag (vl-ctxelement-fix x)) :vl-sequence) (equal (tag (vl-ctxelement-fix x)) :vl-dpiimport) (equal (tag (vl-ctxelement-fix x)) :vl-dpiexport) (equal (tag (vl-ctxelement-fix x)) :vl-bind) (equal (tag (vl-ctxelement-fix x)) :vl-class) (equal (tag (vl-ctxelement-fix x)) :vl-covergroup) (equal (tag (vl-ctxelement-fix x)) :vl-elabtask)) :rule-classes ((:forward-chaining :trigger-terms ((tag (vl-ctxelement-fix x))))))