Fixing function for vl-lexscope structures.
(vl-lexscope-fix x) → new-x
Function:
(defun vl-lexscope-fix$inline (x) (declare (xargs :guard (vl-lexscope-p x))) (let ((__function__ 'vl-lexscope-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((decls (vl-lexscope-decls-fix (std::da-nth 0 x))) (wildpkgs (vl-packagemap-fix (std::da-nth 1 x)))) (list decls wildpkgs)) :exec x)))
Theorem:
(defthm vl-lexscope-p-of-vl-lexscope-fix (b* ((new-x (vl-lexscope-fix$inline x))) (vl-lexscope-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-lexscope-fix-when-vl-lexscope-p (implies (vl-lexscope-p x) (equal (vl-lexscope-fix x) x)))
Function:
(defun vl-lexscope-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-lexscope-p acl2::x) (vl-lexscope-p acl2::y)))) (equal (vl-lexscope-fix acl2::x) (vl-lexscope-fix acl2::y)))
Theorem:
(defthm vl-lexscope-equiv-is-an-equivalence (and (booleanp (vl-lexscope-equiv x y)) (vl-lexscope-equiv x x) (implies (vl-lexscope-equiv x y) (vl-lexscope-equiv y x)) (implies (and (vl-lexscope-equiv x y) (vl-lexscope-equiv y z)) (vl-lexscope-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-lexscope-equiv-implies-equal-vl-lexscope-fix-1 (implies (vl-lexscope-equiv acl2::x x-equiv) (equal (vl-lexscope-fix acl2::x) (vl-lexscope-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-lexscope-fix-under-vl-lexscope-equiv (vl-lexscope-equiv (vl-lexscope-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-lexscope-fix-1-forward-to-vl-lexscope-equiv (implies (equal (vl-lexscope-fix acl2::x) acl2::y) (vl-lexscope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-lexscope-fix-2-forward-to-vl-lexscope-equiv (implies (equal acl2::x (vl-lexscope-fix acl2::y)) (vl-lexscope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-lexscope-equiv-of-vl-lexscope-fix-1-forward (implies (vl-lexscope-equiv (vl-lexscope-fix acl2::x) acl2::y) (vl-lexscope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-lexscope-equiv-of-vl-lexscope-fix-2-forward (implies (vl-lexscope-equiv acl2::x (vl-lexscope-fix acl2::y)) (vl-lexscope-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)