Fixing function for vl-fundecl structures.
(vl-fundecl-fix x) → new-x
Function:
(defun vl-fundecl-fix$inline (x) (declare (xargs :guard (vl-fundecl-p x))) (let ((__function__ 'vl-fundecl-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (str-fix (std::prod-car (std::prod-car (std::prod-car (cdr x)))))) (rettype (vl-datatype-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-car (cdr x))))))) (body (vl-stmt-fix (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-car (cdr x))))))) (loc (vl-location-fix (std::prod-car (std::prod-cdr (std::prod-car (cdr x)))))) (portdecls (vl-portdecllist-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (function-map (vl-function-specialization-map-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (lifetime (vl-lifetime-fix (std::prod-car (std::prod-car (std::prod-cdr (cdr x)))))) (vardecls (vl-vardecllist-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (paramdecls (vl-paramdecllist-fix (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (typedefs (vl-typedeflist-fix (std::prod-car (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (imports (vl-importlist-fix (std::prod-cdr (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (atts (vl-atts-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))) (loaditems (vl-portdecl-or-blockitem-list-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x)))))))) (cons :vl-fundecl (std::prod-cons (std::prod-cons (std::prod-cons name (std::prod-cons rettype body)) (std::prod-cons loc (std::prod-cons portdecls function-map))) (std::prod-cons (std::prod-cons lifetime (std::prod-cons vardecls paramdecls)) (std::prod-cons (std::prod-cons typedefs imports) (std::prod-cons atts loaditems)))))) :exec x)))
Theorem:
(defthm vl-fundecl-p-of-vl-fundecl-fix (b* ((new-x (vl-fundecl-fix$inline x))) (vl-fundecl-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-fundecl-fix-when-vl-fundecl-p (implies (vl-fundecl-p x) (equal (vl-fundecl-fix x) x)))
Function:
(defun vl-fundecl-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-fundecl-p acl2::x) (vl-fundecl-p acl2::y)))) (equal (vl-fundecl-fix acl2::x) (vl-fundecl-fix acl2::y)))
Theorem:
(defthm vl-fundecl-equiv-is-an-equivalence (and (booleanp (vl-fundecl-equiv x y)) (vl-fundecl-equiv x x) (implies (vl-fundecl-equiv x y) (vl-fundecl-equiv y x)) (implies (and (vl-fundecl-equiv x y) (vl-fundecl-equiv y z)) (vl-fundecl-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-fundecl-equiv-implies-equal-vl-fundecl-fix-1 (implies (vl-fundecl-equiv acl2::x x-equiv) (equal (vl-fundecl-fix acl2::x) (vl-fundecl-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-fundecl-fix-under-vl-fundecl-equiv (vl-fundecl-equiv (vl-fundecl-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-fundecl-fix-1-forward-to-vl-fundecl-equiv (implies (equal (vl-fundecl-fix acl2::x) acl2::y) (vl-fundecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-fundecl-fix-2-forward-to-vl-fundecl-equiv (implies (equal acl2::x (vl-fundecl-fix acl2::y)) (vl-fundecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-fundecl-equiv-of-vl-fundecl-fix-1-forward (implies (vl-fundecl-equiv (vl-fundecl-fix acl2::x) acl2::y) (vl-fundecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-fundecl-equiv-of-vl-fundecl-fix-2-forward (implies (vl-fundecl-equiv acl2::x (vl-fundecl-fix acl2::y)) (vl-fundecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)