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