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