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