Fixing function for vl-lucidocc structures.
(vl-lucidocc-fix x) → new-x
Function:
(defun vl-lucidocc-fix$inline (x) (declare (xargs :guard (vl-lucidocc-p x))) (let ((__function__ 'vl-lucidocc-fix)) (declare (ignorable __function__)) (mbe :logic (common-lisp::case (vl-lucidocc-kind x) (:solo (b* ((ctx (vl-context1-fix (std::da-nth 0 (cdr x)))) (ss (vl-scopestack-fix (std::da-nth 1 (cdr x))))) (cons :solo (list ctx ss)))) (:slice (b* ((left (vl-expr-fix (std::da-nth 0 (cdr x)))) (right (vl-expr-fix (std::da-nth 1 (cdr x)))) (ctx (vl-context1-fix (std::da-nth 2 (cdr x)))) (ss (vl-scopestack-fix (std::da-nth 3 (cdr x))))) (cons :slice (list left right ctx ss)))) (:tail (b* ((ctx (vl-context1-fix (std::da-nth 0 (cdr x)))) (ss (vl-scopestack-fix (std::da-nth 1 (cdr x))))) (cons :tail (list ctx ss))))) :exec x)))
Theorem:
(defthm vl-lucidocc-p-of-vl-lucidocc-fix (b* ((new-x (vl-lucidocc-fix$inline x))) (vl-lucidocc-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-lucidocc-fix-when-vl-lucidocc-p (implies (vl-lucidocc-p x) (equal (vl-lucidocc-fix x) x)))
Function:
(defun vl-lucidocc-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-lucidocc-p acl2::x) (vl-lucidocc-p acl2::y)))) (equal (vl-lucidocc-fix acl2::x) (vl-lucidocc-fix acl2::y)))
Theorem:
(defthm vl-lucidocc-equiv-is-an-equivalence (and (booleanp (vl-lucidocc-equiv x y)) (vl-lucidocc-equiv x x) (implies (vl-lucidocc-equiv x y) (vl-lucidocc-equiv y x)) (implies (and (vl-lucidocc-equiv x y) (vl-lucidocc-equiv y z)) (vl-lucidocc-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-lucidocc-equiv-implies-equal-vl-lucidocc-fix-1 (implies (vl-lucidocc-equiv acl2::x x-equiv) (equal (vl-lucidocc-fix acl2::x) (vl-lucidocc-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-lucidocc-fix-under-vl-lucidocc-equiv (vl-lucidocc-equiv (vl-lucidocc-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-lucidocc-fix-1-forward-to-vl-lucidocc-equiv (implies (equal (vl-lucidocc-fix acl2::x) acl2::y) (vl-lucidocc-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-lucidocc-fix-2-forward-to-vl-lucidocc-equiv (implies (equal acl2::x (vl-lucidocc-fix acl2::y)) (vl-lucidocc-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-lucidocc-equiv-of-vl-lucidocc-fix-1-forward (implies (vl-lucidocc-equiv (vl-lucidocc-fix acl2::x) acl2::y) (vl-lucidocc-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-lucidocc-equiv-of-vl-lucidocc-fix-2-forward (implies (vl-lucidocc-equiv acl2::x (vl-lucidocc-fix acl2::y)) (vl-lucidocc-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-lucidocc-kind$inline-of-vl-lucidocc-fix-x (equal (vl-lucidocc-kind$inline (vl-lucidocc-fix x)) (vl-lucidocc-kind$inline x)))
Theorem:
(defthm vl-lucidocc-kind$inline-vl-lucidocc-equiv-congruence-on-x (implies (vl-lucidocc-equiv x x-equiv) (equal (vl-lucidocc-kind$inline x) (vl-lucidocc-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-vl-lucidocc-fix (consp (vl-lucidocc-fix x)) :rule-classes :type-prescription)