Fixing function for vl-lexscope-entry structures.
(vl-lexscope-entry-fix x) → new-x
Function:
(defun vl-lexscope-entry-fix$inline (x) (declare (xargs :guard (vl-lexscope-entry-p x))) (let ((__function__ 'vl-lexscope-entry-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((decl (identity (std::prod-car (cdr x)))) (direct-pkg (maybe-string-fix (std::prod-car (std::prod-cdr (cdr x))))) (wildpkgs (string-list-fix (std::prod-cdr (std::prod-cdr (cdr x)))))) (cons :vl-lexscope-entry (std::prod-cons decl (std::prod-cons direct-pkg wildpkgs)))) :exec x)))
Theorem:
(defthm vl-lexscope-entry-p-of-vl-lexscope-entry-fix (b* ((new-x (vl-lexscope-entry-fix$inline x))) (vl-lexscope-entry-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-lexscope-entry-fix-when-vl-lexscope-entry-p (implies (vl-lexscope-entry-p x) (equal (vl-lexscope-entry-fix x) x)))
Function:
(defun vl-lexscope-entry-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-lexscope-entry-p acl2::x) (vl-lexscope-entry-p acl2::y)))) (equal (vl-lexscope-entry-fix acl2::x) (vl-lexscope-entry-fix acl2::y)))
Theorem:
(defthm vl-lexscope-entry-equiv-is-an-equivalence (and (booleanp (vl-lexscope-entry-equiv x y)) (vl-lexscope-entry-equiv x x) (implies (vl-lexscope-entry-equiv x y) (vl-lexscope-entry-equiv y x)) (implies (and (vl-lexscope-entry-equiv x y) (vl-lexscope-entry-equiv y z)) (vl-lexscope-entry-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-lexscope-entry-equiv-implies-equal-vl-lexscope-entry-fix-1 (implies (vl-lexscope-entry-equiv acl2::x x-equiv) (equal (vl-lexscope-entry-fix acl2::x) (vl-lexscope-entry-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-lexscope-entry-fix-under-vl-lexscope-entry-equiv (vl-lexscope-entry-equiv (vl-lexscope-entry-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-lexscope-entry-fix-1-forward-to-vl-lexscope-entry-equiv (implies (equal (vl-lexscope-entry-fix acl2::x) acl2::y) (vl-lexscope-entry-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-lexscope-entry-fix-2-forward-to-vl-lexscope-entry-equiv (implies (equal acl2::x (vl-lexscope-entry-fix acl2::y)) (vl-lexscope-entry-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-lexscope-entry-equiv-of-vl-lexscope-entry-fix-1-forward (implies (vl-lexscope-entry-equiv (vl-lexscope-entry-fix acl2::x) acl2::y) (vl-lexscope-entry-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-lexscope-entry-equiv-of-vl-lexscope-entry-fix-2-forward (implies (vl-lexscope-entry-equiv acl2::x (vl-lexscope-entry-fix acl2::y)) (vl-lexscope-entry-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)