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