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