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