Fixing function for vl-loadresult structures.
(vl-loadresult-fix x) → new-x
Function:
(defun vl-loadresult-fix$inline (x) (declare (xargs :guard (vl-loadresult-p x))) (let ((__function__ 'vl-loadresult-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((design (vl-design-fix (cdr (std::da-nth 0 (cdr x))))) (filemap (vl-filemap-fix (cdr (std::da-nth 1 (cdr x))))) (defines (vl-defines-fix (cdr (std::da-nth 2 (cdr x)))) ) (ifdefmap (vl-ifdef-use-map-fix (cdr (std::da-nth 3 (cdr x))))) (defmap (vl-def-use-map-fix (cdr (std::da-nth 4 (cdr x)))))) (cons :vl-loadresult (list (cons 'design design) (cons 'filemap filemap) (cons 'defines defines) (cons 'ifdefmap ifdefmap) (cons 'defmap defmap)))) :exec x)))
Theorem:
(defthm vl-loadresult-p-of-vl-loadresult-fix (b* ((new-x (vl-loadresult-fix$inline x))) (vl-loadresult-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-loadresult-fix-when-vl-loadresult-p (implies (vl-loadresult-p x) (equal (vl-loadresult-fix x) x)))
Function:
(defun vl-loadresult-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-loadresult-p acl2::x) (vl-loadresult-p acl2::y)))) (equal (vl-loadresult-fix acl2::x) (vl-loadresult-fix acl2::y)))
Theorem:
(defthm vl-loadresult-equiv-is-an-equivalence (and (booleanp (vl-loadresult-equiv x y)) (vl-loadresult-equiv x x) (implies (vl-loadresult-equiv x y) (vl-loadresult-equiv y x)) (implies (and (vl-loadresult-equiv x y) (vl-loadresult-equiv y z)) (vl-loadresult-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-loadresult-equiv-implies-equal-vl-loadresult-fix-1 (implies (vl-loadresult-equiv acl2::x x-equiv) (equal (vl-loadresult-fix acl2::x) (vl-loadresult-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-loadresult-fix-under-vl-loadresult-equiv (vl-loadresult-equiv (vl-loadresult-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-loadresult-fix-1-forward-to-vl-loadresult-equiv (implies (equal (vl-loadresult-fix acl2::x) acl2::y) (vl-loadresult-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-loadresult-fix-2-forward-to-vl-loadresult-equiv (implies (equal acl2::x (vl-loadresult-fix acl2::y)) (vl-loadresult-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-loadresult-equiv-of-vl-loadresult-fix-1-forward (implies (vl-loadresult-equiv (vl-loadresult-fix acl2::x) acl2::y) (vl-loadresult-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-loadresult-equiv-of-vl-loadresult-fix-2-forward (implies (vl-loadresult-equiv acl2::x (vl-loadresult-fix acl2::y)) (vl-loadresult-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)