Fixing function for vl-package structures.
(vl-package-fix x) → new-x
Function:
(defun vl-package-fix$inline (x) (declare (xargs :guard (vl-package-p x))) (let ((__function__ 'vl-package-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (str-fix (std::prod-car (std::prod-car (std::prod-car (std::prod-car (cdr x))))))) (minloc (vl-location-fix (std::prod-cdr (std::prod-car (std::prod-car (std::prod-car (cdr x))))))) (maxloc (vl-location-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-car (cdr x))))))) (paramdecls (vl-paramdecllist-fix (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-car (cdr x))))))) (typedefs (vl-typedeflist-fix (std::prod-car (std::prod-car (std::prod-cdr (std::prod-car (cdr x))))))) (comments (vl-commentmap-fix (std::prod-cdr (std::prod-car (std::prod-cdr (std::prod-car (cdr x))))))) (warnings (vl-warninglist-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (imports (vl-importlist-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (fundecls (vl-fundecllist-fix (std::prod-car (std::prod-car (std::prod-car (std::prod-cdr (cdr x))))))) (taskdecls (vl-taskdecllist-fix (std::prod-cdr (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))))))) (lifetime (vl-lifetime-fix (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (dpiimports (vl-dpiimportlist-fix (std::prod-car (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (dpiexports (vl-dpiexportlist-fix (std::prod-cdr (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (classes (vl-classlist-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))) (atts (vl-atts-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x)))))))) (cons :vl-package (std::prod-cons (std::prod-cons (std::prod-cons (std::prod-cons name minloc) (std::prod-cons maxloc paramdecls)) (std::prod-cons (std::prod-cons typedefs comments) (std::prod-cons warnings imports))) (std::prod-cons (std::prod-cons (std::prod-cons fundecls taskdecls) (std::prod-cons vardecls lifetime)) (std::prod-cons (std::prod-cons dpiimports dpiexports) (std::prod-cons classes atts)))))) :exec x)))
Theorem:
(defthm vl-package-p-of-vl-package-fix (b* ((new-x (vl-package-fix$inline x))) (vl-package-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-package-fix-when-vl-package-p (implies (vl-package-p x) (equal (vl-package-fix x) x)))
Function:
(defun vl-package-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-package-p acl2::x) (vl-package-p acl2::y)))) (equal (vl-package-fix acl2::x) (vl-package-fix acl2::y)))
Theorem:
(defthm vl-package-equiv-is-an-equivalence (and (booleanp (vl-package-equiv x y)) (vl-package-equiv x x) (implies (vl-package-equiv x y) (vl-package-equiv y x)) (implies (and (vl-package-equiv x y) (vl-package-equiv y z)) (vl-package-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-package-equiv-implies-equal-vl-package-fix-1 (implies (vl-package-equiv acl2::x x-equiv) (equal (vl-package-fix acl2::x) (vl-package-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-package-fix-under-vl-package-equiv (vl-package-equiv (vl-package-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-package-fix-1-forward-to-vl-package-equiv (implies (equal (vl-package-fix acl2::x) acl2::y) (vl-package-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-package-fix-2-forward-to-vl-package-equiv (implies (equal acl2::x (vl-package-fix acl2::y)) (vl-package-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-package-equiv-of-vl-package-fix-1-forward (implies (vl-package-equiv (vl-package-fix acl2::x) acl2::y) (vl-package-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-package-equiv-of-vl-package-fix-2-forward (implies (vl-package-equiv acl2::x (vl-package-fix acl2::y)) (vl-package-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)