Fixing function for vl-delta structures.
(vl-delta-fix x) → new-x
Function:
(defun vl-delta-fix$inline (x) (declare (xargs :guard (vl-delta-p x))) (let ((__function__ 'vl-delta-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((nf (vl-namefactory-fix (std::prod-car (std::prod-car x)))) (vardecls (vl-vardecllist-fix (std::prod-car (std::prod-cdr (std::prod-car x))))) (assigns (vl-assignlist-fix (std::prod-cdr (std::prod-cdr (std::prod-car x))))) (modinsts (vl-modinstlist-fix (std::prod-car (std::prod-car (std::prod-cdr x))))) (gateinsts (vl-gateinstlist-fix (std::prod-cdr (std::prod-car (std::prod-cdr x))))) (warnings (vl-warninglist-fix (std::prod-car (std::prod-cdr (std::prod-cdr x))))) (addmods (vl-modulelist-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr x)))))) (std::prod-cons (std::prod-cons nf (std::prod-cons vardecls assigns)) (std::prod-cons (std::prod-cons modinsts gateinsts) (std::prod-cons warnings addmods)))) :exec x)))
Theorem:
(defthm vl-delta-p-of-vl-delta-fix (b* ((new-x (vl-delta-fix$inline x))) (vl-delta-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-delta-fix-when-vl-delta-p (implies (vl-delta-p x) (equal (vl-delta-fix x) x)))
Function:
(defun vl-delta-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-delta-p acl2::x) (vl-delta-p acl2::y)))) (equal (vl-delta-fix acl2::x) (vl-delta-fix acl2::y)))
Theorem:
(defthm vl-delta-equiv-is-an-equivalence (and (booleanp (vl-delta-equiv x y)) (vl-delta-equiv x x) (implies (vl-delta-equiv x y) (vl-delta-equiv y x)) (implies (and (vl-delta-equiv x y) (vl-delta-equiv y z)) (vl-delta-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-delta-equiv-implies-equal-vl-delta-fix-1 (implies (vl-delta-equiv acl2::x x-equiv) (equal (vl-delta-fix acl2::x) (vl-delta-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-delta-fix-under-vl-delta-equiv (vl-delta-equiv (vl-delta-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-delta-fix-1-forward-to-vl-delta-equiv (implies (equal (vl-delta-fix acl2::x) acl2::y) (vl-delta-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-delta-fix-2-forward-to-vl-delta-equiv (implies (equal acl2::x (vl-delta-fix acl2::y)) (vl-delta-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-delta-equiv-of-vl-delta-fix-1-forward (implies (vl-delta-equiv (vl-delta-fix acl2::x) acl2::y) (vl-delta-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-delta-equiv-of-vl-delta-fix-2-forward (implies (vl-delta-equiv acl2::x (vl-delta-fix acl2::y)) (vl-delta-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)