Fixing function for vl-udp structures.
Function:
(defun vl-udp-fix$inline (x) (declare (xargs :guard (vl-udp-p x))) (let ((__function__ 'vl-udp-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (str-fix (std::prod-car (std::prod-car (std::prod-car (cdr x)))))) (output (vl-portdecl-fix (std::prod-cdr (std::prod-car (std::prod-car (cdr x)))))) (inputs (vl-portdecllist-fix (std::prod-car (std::prod-cdr (std::prod-car (cdr x)))))) (sequentialp (acl2::bool-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (table (vl-udptable-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x)))))) ) (initval (vl-maybe-expr-fix (std::prod-car (std::prod-car (std::prod-cdr (cdr x)))))) (warnings (vl-warninglist-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (minloc (vl-location-fix (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (maxloc (vl-location-fix (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x)))))) (atts (vl-atts-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))) (comments (vl-commentmap-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x)))))))) (cons :vl-udp (std::prod-cons (std::prod-cons (std::prod-cons name output) (std::prod-cons inputs (std::prod-cons sequentialp table))) (std::prod-cons (std::prod-cons initval (std::prod-cons warnings minloc)) (std::prod-cons maxloc (std::prod-cons atts comments)))))) :exec x)))
Theorem:
(defthm vl-udp-p-of-vl-udp-fix (b* ((new-x (vl-udp-fix$inline x))) (vl-udp-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-udp-fix-when-vl-udp-p (implies (vl-udp-p x) (equal (vl-udp-fix x) x)))
Function:
(defun vl-udp-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-udp-p acl2::x) (vl-udp-p acl2::y)))) (equal (vl-udp-fix acl2::x) (vl-udp-fix acl2::y)))
Theorem:
(defthm vl-udp-equiv-is-an-equivalence (and (booleanp (vl-udp-equiv x y)) (vl-udp-equiv x x) (implies (vl-udp-equiv x y) (vl-udp-equiv y x)) (implies (and (vl-udp-equiv x y) (vl-udp-equiv y z)) (vl-udp-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-udp-equiv-implies-equal-vl-udp-fix-1 (implies (vl-udp-equiv acl2::x x-equiv) (equal (vl-udp-fix acl2::x) (vl-udp-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-udp-fix-under-vl-udp-equiv (vl-udp-equiv (vl-udp-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-udp-fix-1-forward-to-vl-udp-equiv (implies (equal (vl-udp-fix acl2::x) acl2::y) (vl-udp-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-udp-fix-2-forward-to-vl-udp-equiv (implies (equal acl2::x (vl-udp-fix acl2::y)) (vl-udp-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-udp-equiv-of-vl-udp-fix-1-forward (implies (vl-udp-equiv (vl-udp-fix acl2::x) acl2::y) (vl-udp-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-udp-equiv-of-vl-udp-fix-2-forward (implies (vl-udp-equiv acl2::x (vl-udp-fix acl2::y)) (vl-udp-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)