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