Fixing function for vl-vardecl structures.
(vl-vardecl-fix x) → new-x
Function:
(defun vl-vardecl-fix$inline (x) (declare (xargs :guard (vl-vardecl-p x))) (let ((__function__ 'vl-vardecl-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (str-fix (std::prod-car (std::prod-car (std::prod-car (cdr x)))))) (loc (vl-location-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-car (cdr x))))))) (type (vl-datatype-fix (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-car (cdr x))))))) (nettype (vl-maybe-nettypename-fix (std::prod-car (std::prod-car (std::prod-cdr (std::prod-car (cdr x))))))) (atts (vl-atts-fix (std::prod-cdr (std::prod-car (std::prod-cdr (std::prod-car (cdr x))))))) (initval (vl-maybe-rhs-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (constp (acl2::bool-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (constval (sv::maybe-4vec-fix (std::prod-car (std::prod-car (std::prod-cdr (cdr x)))))) (varp (acl2::bool-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (lifetime (vl-lifetime-fix (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (vectoredp (acl2::bool-fix (std::prod-car (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (scalaredp (acl2::bool-fix (std::prod-cdr (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (delay (vl-maybe-gatedelay-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))) (cstrength (vl-maybe-cstrength-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x)))))))) (cons :vl-vardecl (std::prod-cons (std::prod-cons (std::prod-cons name (std::prod-cons loc type)) (std::prod-cons (std::prod-cons nettype atts) (std::prod-cons initval constp))) (std::prod-cons (std::prod-cons constval (std::prod-cons varp lifetime)) (std::prod-cons (std::prod-cons vectoredp scalaredp) (std::prod-cons delay cstrength)))))) :exec x)))
Theorem:
(defthm vl-vardecl-p-of-vl-vardecl-fix (b* ((new-x (vl-vardecl-fix$inline x))) (vl-vardecl-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-vardecl-fix-when-vl-vardecl-p (implies (vl-vardecl-p x) (equal (vl-vardecl-fix x) x)))
Function:
(defun vl-vardecl-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-vardecl-p acl2::x) (vl-vardecl-p acl2::y)))) (equal (vl-vardecl-fix acl2::x) (vl-vardecl-fix acl2::y)))
Theorem:
(defthm vl-vardecl-equiv-is-an-equivalence (and (booleanp (vl-vardecl-equiv x y)) (vl-vardecl-equiv x x) (implies (vl-vardecl-equiv x y) (vl-vardecl-equiv y x)) (implies (and (vl-vardecl-equiv x y) (vl-vardecl-equiv y z)) (vl-vardecl-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-vardecl-equiv-implies-equal-vl-vardecl-fix-1 (implies (vl-vardecl-equiv acl2::x x-equiv) (equal (vl-vardecl-fix acl2::x) (vl-vardecl-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-vardecl-fix-under-vl-vardecl-equiv (vl-vardecl-equiv (vl-vardecl-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-vardecl-fix-1-forward-to-vl-vardecl-equiv (implies (equal (vl-vardecl-fix acl2::x) acl2::y) (vl-vardecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-vardecl-fix-2-forward-to-vl-vardecl-equiv (implies (equal acl2::x (vl-vardecl-fix acl2::y)) (vl-vardecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-vardecl-equiv-of-vl-vardecl-fix-1-forward (implies (vl-vardecl-equiv (vl-vardecl-fix acl2::x) acl2::y) (vl-vardecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-vardecl-equiv-of-vl-vardecl-fix-2-forward (implies (vl-vardecl-equiv acl2::x (vl-vardecl-fix acl2::y)) (vl-vardecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)