Fixing function for vl-blockscope structures.
(vl-blockscope-fix x) → new-x
Function:
(defun vl-blockscope-fix$inline (x) (declare (xargs :guard (vl-blockscope-p x))) (let ((__function__ 'vl-blockscope-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((imports (vl-importlist-fix (std::prod-car (std::prod-car (cdr x))))) (paramdecls (vl-paramdecllist-fix (std::prod-car (std::prod-cdr (std::prod-car (cdr x)))))) (vardecls (vl-vardecllist-fix (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x)))))) (typedefs (vl-typedeflist-fix (std::prod-car (std::prod-cdr (cdr x))))) (scopetype (vl-scopetype-fix (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x)))))) (name (maybe-string-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))) (cons :vl-blockscope (std::prod-cons (std::prod-cons imports (std::prod-cons paramdecls vardecls)) (std::prod-cons typedefs (std::prod-cons scopetype name))))) :exec x)))
Theorem:
(defthm vl-blockscope-p-of-vl-blockscope-fix (b* ((new-x (vl-blockscope-fix$inline x))) (vl-blockscope-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-blockscope-fix-when-vl-blockscope-p (implies (vl-blockscope-p x) (equal (vl-blockscope-fix x) x)))
Function:
(defun vl-blockscope-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-blockscope-p acl2::x) (vl-blockscope-p acl2::y)))) (equal (vl-blockscope-fix acl2::x) (vl-blockscope-fix acl2::y)))
Theorem:
(defthm vl-blockscope-equiv-is-an-equivalence (and (booleanp (vl-blockscope-equiv x y)) (vl-blockscope-equiv x x) (implies (vl-blockscope-equiv x y) (vl-blockscope-equiv y x)) (implies (and (vl-blockscope-equiv x y) (vl-blockscope-equiv y z)) (vl-blockscope-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-blockscope-equiv-implies-equal-vl-blockscope-fix-1 (implies (vl-blockscope-equiv acl2::x x-equiv) (equal (vl-blockscope-fix acl2::x) (vl-blockscope-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-blockscope-fix-under-vl-blockscope-equiv (vl-blockscope-equiv (vl-blockscope-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-blockscope-fix-1-forward-to-vl-blockscope-equiv (implies (equal (vl-blockscope-fix acl2::x) acl2::y) (vl-blockscope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-blockscope-fix-2-forward-to-vl-blockscope-equiv (implies (equal acl2::x (vl-blockscope-fix acl2::y)) (vl-blockscope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-blockscope-equiv-of-vl-blockscope-fix-1-forward (implies (vl-blockscope-equiv (vl-blockscope-fix acl2::x) acl2::y) (vl-blockscope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-blockscope-equiv-of-vl-blockscope-fix-2-forward (implies (vl-blockscope-equiv acl2::x (vl-blockscope-fix acl2::y)) (vl-blockscope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)