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