(vl-scope-fix x) is a fty fixing function.
(vl-scope-fix x) → fty::newx
Note that in the execution this is just an inline identity function.
Function:
(defun vl-scope-fix$inline (x) (declare (xargs :guard (vl-scope-p x))) (let ((__function__ 'vl-scope-fix)) (declare (ignorable __function__)) (mbe :logic (common-lisp::case (tag x) ((:vl-interface) (vl-interface-fix x)) ((:vl-module) (vl-module-fix x)) ((:vl-class) (vl-class-fix x)) ((:vl-genblob) (vl-genblob-fix x)) ((:vl-blockscope) (vl-blockscope-fix x)) ((:vl-design) (vl-design-fix x)) ((:vl-package) (vl-package-fix x)) (otherwise (vl-scopeinfo-fix x))) :exec x)))
Theorem:
(defthm vl-scope-p-of-vl-scope-fix (b* ((fty::newx (vl-scope-fix$inline x))) (vl-scope-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm vl-scope-fix-when-vl-scope-p (implies (vl-scope-p x) (equal (vl-scope-fix x) x)))
Function:
(defun vl-scope-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-scope-p acl2::x) (vl-scope-p acl2::y)))) (equal (vl-scope-fix acl2::x) (vl-scope-fix acl2::y)))
Theorem:
(defthm vl-scope-equiv-is-an-equivalence (and (booleanp (vl-scope-equiv x y)) (vl-scope-equiv x x) (implies (vl-scope-equiv x y) (vl-scope-equiv y x)) (implies (and (vl-scope-equiv x y) (vl-scope-equiv y z)) (vl-scope-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-scope-equiv-implies-equal-vl-scope-fix-1 (implies (vl-scope-equiv acl2::x x-equiv) (equal (vl-scope-fix acl2::x) (vl-scope-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-scope-fix-under-vl-scope-equiv (vl-scope-equiv (vl-scope-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-scope-fix-1-forward-to-vl-scope-equiv (implies (equal (vl-scope-fix acl2::x) acl2::y) (vl-scope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-scope-fix-2-forward-to-vl-scope-equiv (implies (equal acl2::x (vl-scope-fix acl2::y)) (vl-scope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-scope-equiv-of-vl-scope-fix-1-forward (implies (vl-scope-equiv (vl-scope-fix acl2::x) acl2::y) (vl-scope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-scope-equiv-of-vl-scope-fix-2-forward (implies (vl-scope-equiv acl2::x (vl-scope-fix acl2::y)) (vl-scope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm tag-of-vl-scope-fix-forward (or (equal (tag (vl-scope-fix x)) :vl-interface) (equal (tag (vl-scope-fix x)) :vl-module) (equal (tag (vl-scope-fix x)) :vl-class) (equal (tag (vl-scope-fix x)) :vl-genblob) (equal (tag (vl-scope-fix x)) :vl-blockscope) (equal (tag (vl-scope-fix x)) :vl-design) (equal (tag (vl-scope-fix x)) :vl-package) (equal (tag (vl-scope-fix x)) :vl-scopeinfo)) :rule-classes ((:forward-chaining :trigger-terms ((tag (vl-scope-fix x))))))