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