Fixing function for vl-modport structures.
(vl-modport-fix x) → new-x
Function:
(defun vl-modport-fix$inline (x) (declare (xargs :guard (vl-modport-p x))) (let ((__function__ 'vl-modport-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (str-fix (cdr (std::da-nth 0 (cdr x))))) (loc (vl-location-fix (cdr (std::da-nth 1 (cdr x))))) (ports (vl-modport-portlist-fix (cdr (std::da-nth 2 (cdr x))))) (atts (vl-atts-fix (cdr (std::da-nth 3 (cdr x)))))) (cons :vl-modport (list (cons 'name name) (cons 'loc loc) (cons 'ports ports) (cons 'atts atts)))) :exec x)))
Theorem:
(defthm vl-modport-p-of-vl-modport-fix (b* ((new-x (vl-modport-fix$inline x))) (vl-modport-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-modport-fix-when-vl-modport-p (implies (vl-modport-p x) (equal (vl-modport-fix x) x)))
Function:
(defun vl-modport-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-modport-p acl2::x) (vl-modport-p acl2::y)))) (equal (vl-modport-fix acl2::x) (vl-modport-fix acl2::y)))
Theorem:
(defthm vl-modport-equiv-is-an-equivalence (and (booleanp (vl-modport-equiv x y)) (vl-modport-equiv x x) (implies (vl-modport-equiv x y) (vl-modport-equiv y x)) (implies (and (vl-modport-equiv x y) (vl-modport-equiv y z)) (vl-modport-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-modport-equiv-implies-equal-vl-modport-fix-1 (implies (vl-modport-equiv acl2::x x-equiv) (equal (vl-modport-fix acl2::x) (vl-modport-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-modport-fix-under-vl-modport-equiv (vl-modport-equiv (vl-modport-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-modport-fix-1-forward-to-vl-modport-equiv (implies (equal (vl-modport-fix acl2::x) acl2::y) (vl-modport-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-modport-fix-2-forward-to-vl-modport-equiv (implies (equal acl2::x (vl-modport-fix acl2::y)) (vl-modport-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-modport-equiv-of-vl-modport-fix-1-forward (implies (vl-modport-equiv (vl-modport-fix acl2::x) acl2::y) (vl-modport-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-modport-equiv-of-vl-modport-fix-2-forward (implies (vl-modport-equiv acl2::x (vl-modport-fix acl2::y)) (vl-modport-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)