Fixing function for vl-loadstate structures.
(vl-loadstate-fix x) → new-x
Function:
(defun vl-loadstate-fix$inline (x) (declare (xargs :guard (vl-loadstate-p x))) (let ((__function__ 'vl-loadstate-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((config (vl-loadconfig-fix (std::prod-car (std::prod-car (std::prod-car (cdr x)))))) (descs (vl-descriptionlist-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-car (cdr x))))))) (descalist (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-car (cdr x)))))) (defines (vl-defines-fix (std::prod-car (std::prod-cdr (std::prod-car (cdr x))))) ) (iskips (vl-includeskips-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (ifdefmap (vl-ifdef-use-map-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (defmap (vl-def-use-map-fix (std::prod-car (std::prod-car (std::prod-cdr (cdr x)))))) (idcache (vl-dirlist-cache-fix (std::prod-car (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (spcache (vl-dirxlist-cache-fix (std::prod-cdr (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x))))))) (reportcard (vl-reportcard-fix (std::prod-car (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (pstate (vl-parsestate-fix (std::prod-cdr (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x))))))) (filemap (vl-filemap-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))) (bytes (nfix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x)))))))) (let ((descalist (vl-make-descalist descs))) (cons :vl-loadstate (std::prod-cons (std::prod-cons (std::prod-cons config (std::prod-cons descs descalist)) (std::prod-cons defines (std::prod-cons iskips ifdefmap))) (std::prod-cons (std::prod-cons defmap (std::prod-cons idcache spcache)) (std::prod-cons (std::prod-cons reportcard pstate) (std::prod-cons filemap bytes))))))) :exec x)))
Theorem:
(defthm vl-loadstate-p-of-vl-loadstate-fix (b* ((new-x (vl-loadstate-fix$inline x))) (vl-loadstate-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-loadstate-fix-when-vl-loadstate-p (implies (vl-loadstate-p x) (equal (vl-loadstate-fix x) x)))
Function:
(defun vl-loadstate-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-loadstate-p acl2::x) (vl-loadstate-p acl2::y)))) (equal (vl-loadstate-fix acl2::x) (vl-loadstate-fix acl2::y)))
Theorem:
(defthm vl-loadstate-equiv-is-an-equivalence (and (booleanp (vl-loadstate-equiv x y)) (vl-loadstate-equiv x x) (implies (vl-loadstate-equiv x y) (vl-loadstate-equiv y x)) (implies (and (vl-loadstate-equiv x y) (vl-loadstate-equiv y z)) (vl-loadstate-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-loadstate-equiv-implies-equal-vl-loadstate-fix-1 (implies (vl-loadstate-equiv acl2::x x-equiv) (equal (vl-loadstate-fix acl2::x) (vl-loadstate-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-loadstate-fix-under-vl-loadstate-equiv (vl-loadstate-equiv (vl-loadstate-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-loadstate-fix-1-forward-to-vl-loadstate-equiv (implies (equal (vl-loadstate-fix acl2::x) acl2::y) (vl-loadstate-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-loadstate-fix-2-forward-to-vl-loadstate-equiv (implies (equal acl2::x (vl-loadstate-fix acl2::y)) (vl-loadstate-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-loadstate-equiv-of-vl-loadstate-fix-1-forward (implies (vl-loadstate-equiv (vl-loadstate-fix acl2::x) acl2::y) (vl-loadstate-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-loadstate-equiv-of-vl-loadstate-fix-2-forward (implies (vl-loadstate-equiv acl2::x (vl-loadstate-fix acl2::y)) (vl-loadstate-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)