Fixing function for vl-import structures.
(vl-import-fix x) → new-x
Function:
(defun vl-import-fix$inline (x) (declare (xargs :guard (vl-import-p x))) (let ((__function__ 'vl-import-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((pkg (str-fix (std::prod-car (std::prod-car (cdr x))))) (part (vl-importpart-fix (std::prod-cdr (std::prod-car (cdr x))))) (loc (vl-location-fix (std::prod-car (std::prod-cdr (cdr x))))) (atts (vl-atts-fix (std::prod-cdr (std::prod-cdr (cdr x)))))) (cons :vl-import (std::prod-cons (std::prod-cons pkg part) (std::prod-cons loc atts)))) :exec x)))
Theorem:
(defthm vl-import-p-of-vl-import-fix (b* ((new-x (vl-import-fix$inline x))) (vl-import-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-import-fix-when-vl-import-p (implies (vl-import-p x) (equal (vl-import-fix x) x)))
Function:
(defun vl-import-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-import-p acl2::x) (vl-import-p acl2::y)))) (equal (vl-import-fix acl2::x) (vl-import-fix acl2::y)))
Theorem:
(defthm vl-import-equiv-is-an-equivalence (and (booleanp (vl-import-equiv x y)) (vl-import-equiv x x) (implies (vl-import-equiv x y) (vl-import-equiv y x)) (implies (and (vl-import-equiv x y) (vl-import-equiv y z)) (vl-import-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-import-equiv-implies-equal-vl-import-fix-1 (implies (vl-import-equiv acl2::x x-equiv) (equal (vl-import-fix acl2::x) (vl-import-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-import-fix-under-vl-import-equiv (vl-import-equiv (vl-import-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-import-fix-1-forward-to-vl-import-equiv (implies (equal (vl-import-fix acl2::x) acl2::y) (vl-import-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-import-fix-2-forward-to-vl-import-equiv (implies (equal acl2::x (vl-import-fix acl2::y)) (vl-import-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-import-equiv-of-vl-import-fix-1-forward (implies (vl-import-equiv (vl-import-fix acl2::x) acl2::y) (vl-import-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-import-equiv-of-vl-import-fix-2-forward (implies (vl-import-equiv acl2::x (vl-import-fix acl2::y)) (vl-import-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)