Fixing function for vl-genblob structures.
(vl-genblob-fix x) → new-x
Function:
(defun vl-genblob-fix$inline (x) (declare (xargs :guard (vl-genblob-p x))) (let ((__function__ 'vl-genblob-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((portdecls (vl-portdecllist-fix (std::prod-car (std::prod-car (std::prod-car (std::prod-car (cdr x))))))) (assigns (vl-assignlist-fix (std::prod-cdr (std::prod-car (std::prod-car (std::prod-car (cdr x))))))) (aliases (vl-aliaslist-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-car (cdr x))))))) (vardecls (vl-vardecllist-fix (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-car (cdr x))))))) (paramdecls (vl-paramdecllist-fix (std::prod-car (std::prod-car (std::prod-cdr (std::prod-car (cdr x))))))) (fundecls (vl-fundecllist-fix (std::prod-cdr (std::prod-car (std::prod-cdr (std::prod-car (cdr x))))))) (taskdecls (vl-taskdecllist-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (modinsts (vl-modinstlist-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x)))))))) (gateinsts (vl-gateinstlist-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x)))))))) (alwayses (vl-alwayslist-fix (std::prod-car (std::prod-car (std::prod-car (std::prod-cdr (cdr x))))))) (initials (vl-initiallist-fix (std::prod-cdr (std::prod-car (std::prod-car (std::prod-cdr (cdr x))))))) (typedefs (vl-typedeflist-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (imports (vl-importlist-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x)))))))) (fwdtypedefs (vl-fwdtypedeflist-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x)))))))) (modports (vl-modportlist-fix (std::prod-car (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (genvars (vl-genvarlist-fix (std::prod-cdr (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (generates (vl-genelementlist-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))) (ports (vl-portlist-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x)))))))) (name (maybe-string-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))))) (cons :vl-genblob (std::prod-cons (std::prod-cons (std::prod-cons (std::prod-cons portdecls assigns) (std::prod-cons aliases vardecls)) (std::prod-cons (std::prod-cons paramdecls fundecls) (std::prod-cons taskdecls (std::prod-cons modinsts gateinsts)))) (std::prod-cons (std::prod-cons (std::prod-cons alwayses initials) (std::prod-cons typedefs (std::prod-cons imports fwdtypedefs))) (std::prod-cons (std::prod-cons modports genvars) (std::prod-cons generates (std::prod-cons ports name))))))) :exec x)))
Theorem:
(defthm vl-genblob-p-of-vl-genblob-fix (b* ((new-x (vl-genblob-fix$inline x))) (vl-genblob-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-genblob-fix-when-vl-genblob-p (implies (vl-genblob-p x) (equal (vl-genblob-fix x) x)))
Function:
(defun vl-genblob-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-genblob-p acl2::x) (vl-genblob-p acl2::y)))) (equal (vl-genblob-fix acl2::x) (vl-genblob-fix acl2::y)))
Theorem:
(defthm vl-genblob-equiv-is-an-equivalence (and (booleanp (vl-genblob-equiv x y)) (vl-genblob-equiv x x) (implies (vl-genblob-equiv x y) (vl-genblob-equiv y x)) (implies (and (vl-genblob-equiv x y) (vl-genblob-equiv y z)) (vl-genblob-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-genblob-equiv-implies-equal-vl-genblob-fix-1 (implies (vl-genblob-equiv acl2::x x-equiv) (equal (vl-genblob-fix acl2::x) (vl-genblob-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-genblob-fix-under-vl-genblob-equiv (vl-genblob-equiv (vl-genblob-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-genblob-fix-1-forward-to-vl-genblob-equiv (implies (equal (vl-genblob-fix acl2::x) acl2::y) (vl-genblob-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-genblob-fix-2-forward-to-vl-genblob-equiv (implies (equal acl2::x (vl-genblob-fix acl2::y)) (vl-genblob-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-genblob-equiv-of-vl-genblob-fix-1-forward (implies (vl-genblob-equiv (vl-genblob-fix acl2::x) acl2::y) (vl-genblob-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-genblob-equiv-of-vl-genblob-fix-2-forward (implies (vl-genblob-equiv acl2::x (vl-genblob-fix acl2::y)) (vl-genblob-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)