Fixing function for vl-interface structures.
(vl-interface-fix x) → new-x
Function:
(defun vl-interface-fix$inline (x) (declare (xargs :guard (vl-interface-p x))) (let ((__function__ 'vl-interface-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (str-fix (std::prod-car (std::prod-car (std::prod-car (cdr x)))))) (ports (vl-portlist-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-car (cdr x))))))) (portdecls (vl-portdecllist-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))))))) (vardecls (vl-vardecllist-fix (std::prod-cdr (std::prod-car (std::prod-cdr (std::prod-car (cdr x))))))) (modports (vl-modportlist-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (generates (vl-genelementlist-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (imports (vl-importlist-fix (std::prod-car (std::prod-car (std::prod-car (std::prod-cdr (cdr x))))))) (warnings (vl-warninglist-fix (std::prod-cdr (std::prod-car (std::prod-car (std::prod-cdr (cdr x))))))) (minloc (vl-location-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (maxloc (vl-location-fix (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (atts (vl-atts-fix (std::prod-car (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (origname (str-fix (std::prod-cdr (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (comments (vl-commentmap-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))) (loaditems (vl-genelementlist-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x)))))))) (cons :vl-interface (std::prod-cons (std::prod-cons (std::prod-cons name (std::prod-cons ports portdecls)) (std::prod-cons (std::prod-cons paramdecls vardecls) (std::prod-cons modports generates))) (std::prod-cons (std::prod-cons (std::prod-cons imports warnings) (std::prod-cons minloc maxloc)) (std::prod-cons (std::prod-cons atts origname) (std::prod-cons comments loaditems)))))) :exec x)))
Theorem:
(defthm vl-interface-p-of-vl-interface-fix (b* ((new-x (vl-interface-fix$inline x))) (vl-interface-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-interface-fix-when-vl-interface-p (implies (vl-interface-p x) (equal (vl-interface-fix x) x)))
Function:
(defun vl-interface-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-interface-p acl2::x) (vl-interface-p acl2::y)))) (equal (vl-interface-fix acl2::x) (vl-interface-fix acl2::y)))
Theorem:
(defthm vl-interface-equiv-is-an-equivalence (and (booleanp (vl-interface-equiv x y)) (vl-interface-equiv x x) (implies (vl-interface-equiv x y) (vl-interface-equiv y x)) (implies (and (vl-interface-equiv x y) (vl-interface-equiv y z)) (vl-interface-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-interface-equiv-implies-equal-vl-interface-fix-1 (implies (vl-interface-equiv acl2::x x-equiv) (equal (vl-interface-fix acl2::x) (vl-interface-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-interface-fix-under-vl-interface-equiv (vl-interface-equiv (vl-interface-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-interface-fix-1-forward-to-vl-interface-equiv (implies (equal (vl-interface-fix acl2::x) acl2::y) (vl-interface-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-interface-fix-2-forward-to-vl-interface-equiv (implies (equal acl2::x (vl-interface-fix acl2::y)) (vl-interface-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-interface-equiv-of-vl-interface-fix-1-forward (implies (vl-interface-equiv (vl-interface-fix acl2::x) acl2::y) (vl-interface-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-interface-equiv-of-vl-interface-fix-2-forward (implies (vl-interface-equiv acl2::x (vl-interface-fix acl2::y)) (vl-interface-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)