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