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