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