Name a gate instance, if necessary.
(vl-gateinst-addinstnames x nf) → (mv new-x nf)
Function:
(defun vl-gateinst-addinstnames (x nf) (declare (xargs :guard (and (vl-gateinst-p x) (vl-namefactory-p nf)))) (let ((__function__ 'vl-gateinst-addinstnames)) (declare (ignorable __function__)) (b* (((when (vl-gateinst->name x)) (mv (vl-gateinst-fix x) (vl-namefactory-fix nf))) ((mv new-name nf) (vl-namefactory-indexed-name "gateinst" nf)) (new-x (change-vl-gateinst x :name new-name))) (mv new-x nf))))
Theorem:
(defthm vl-gateinst-p-of-vl-gateinst-addinstnames.new-x (b* (((mv ?new-x ?nf) (vl-gateinst-addinstnames x nf))) (vl-gateinst-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-namefactory-p-of-vl-gateinst-addinstnames.nf (b* (((mv ?new-x ?nf) (vl-gateinst-addinstnames x nf))) (vl-namefactory-p nf)) :rule-classes :rewrite)
Theorem:
(defthm vl-gateinst-addinstnames-of-vl-gateinst-fix-x (equal (vl-gateinst-addinstnames (vl-gateinst-fix x) nf) (vl-gateinst-addinstnames x nf)))
Theorem:
(defthm vl-gateinst-addinstnames-vl-gateinst-equiv-congruence-on-x (implies (vl-gateinst-equiv x x-equiv) (equal (vl-gateinst-addinstnames x nf) (vl-gateinst-addinstnames x-equiv nf))) :rule-classes :congruence)
Theorem:
(defthm vl-gateinst-addinstnames-of-vl-namefactory-fix-nf (equal (vl-gateinst-addinstnames x (vl-namefactory-fix nf)) (vl-gateinst-addinstnames x nf)))
Theorem:
(defthm vl-gateinst-addinstnames-vl-namefactory-equiv-congruence-on-nf (implies (vl-namefactory-equiv nf nf-equiv) (equal (vl-gateinst-addinstnames x nf) (vl-gateinst-addinstnames x nf-equiv))) :rule-classes :congruence)