Fixing function for vl-lucidkey structures.
(vl-lucidkey-fix x) → new-x
Function:
(defun vl-lucidkey-fix$inline (x) (declare (xargs :guard (vl-lucidkey-p x))) (let ((__function__ 'vl-lucidkey-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((item (vl-scopeitem-fix (std::prod-car x))) (scopestack (vl-scopestack-fix (std::prod-cdr x)))) (std::prod-hons item scopestack)) :exec x)))
Theorem:
(defthm vl-lucidkey-p-of-vl-lucidkey-fix (b* ((new-x (vl-lucidkey-fix$inline x))) (vl-lucidkey-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-lucidkey-fix-when-vl-lucidkey-p (implies (vl-lucidkey-p x) (equal (vl-lucidkey-fix x) x)))
Function:
(defun vl-lucidkey-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-lucidkey-p acl2::x) (vl-lucidkey-p acl2::y)))) (equal (vl-lucidkey-fix acl2::x) (vl-lucidkey-fix acl2::y)))
Theorem:
(defthm vl-lucidkey-equiv-is-an-equivalence (and (booleanp (vl-lucidkey-equiv x y)) (vl-lucidkey-equiv x x) (implies (vl-lucidkey-equiv x y) (vl-lucidkey-equiv y x)) (implies (and (vl-lucidkey-equiv x y) (vl-lucidkey-equiv y z)) (vl-lucidkey-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-lucidkey-equiv-implies-equal-vl-lucidkey-fix-1 (implies (vl-lucidkey-equiv acl2::x x-equiv) (equal (vl-lucidkey-fix acl2::x) (vl-lucidkey-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-lucidkey-fix-under-vl-lucidkey-equiv (vl-lucidkey-equiv (vl-lucidkey-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-lucidkey-fix-1-forward-to-vl-lucidkey-equiv (implies (equal (vl-lucidkey-fix acl2::x) acl2::y) (vl-lucidkey-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-lucidkey-fix-2-forward-to-vl-lucidkey-equiv (implies (equal acl2::x (vl-lucidkey-fix acl2::y)) (vl-lucidkey-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-lucidkey-equiv-of-vl-lucidkey-fix-1-forward (implies (vl-lucidkey-equiv (vl-lucidkey-fix acl2::x) acl2::y) (vl-lucidkey-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-lucidkey-equiv-of-vl-lucidkey-fix-2-forward (implies (vl-lucidkey-equiv acl2::x (vl-lucidkey-fix acl2::y)) (vl-lucidkey-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)