Function:
(defun svar-register-indnamememo (x scope moddb indnamememo) (declare (xargs :stobjs (moddb indnamememo))) (declare (xargs :guard (and (svar-p x) (modscope-p scope) (moddb-ok moddb)))) (declare (xargs :guard (and (modscope-okp scope moddb) (svar-boundedp x (modscope-local-bound scope moddb))))) (let ((__function__ 'svar-register-indnamememo)) (declare (ignorable __function__)) (b* ((idx (lnfix (svar-index x))) (in-bounds (< idx (indnames-length indnamememo))) (look (and in-bounds (get-indname idx indnamememo))) ((when look) indnamememo) ((mv ?name wire) (moddb-wireidx->path/decl idx (modscope->modidx scope) moddb))) (if in-bounds (set-indname idx (make-indname-result :varname x :decl wire) indnamememo) indnamememo))))
Theorem:
(defthm return-type-of-svar-register-indnamememo (b* ((indnamememo1 (svar-register-indnamememo x scope moddb indnamememo))) (equal (len indnamememo1) (len indnamememo))) :rule-classes :rewrite)
Theorem:
(defthm svar-register-indnamememo-of-svar-fix-x (equal (svar-register-indnamememo (svar-fix x) scope moddb indnamememo) (svar-register-indnamememo x scope moddb indnamememo)))
Theorem:
(defthm svar-register-indnamememo-svar-equiv-congruence-on-x (implies (svar-equiv x x-equiv) (equal (svar-register-indnamememo x scope moddb indnamememo) (svar-register-indnamememo x-equiv scope moddb indnamememo))) :rule-classes :congruence)
Theorem:
(defthm svar-register-indnamememo-of-modscope-fix-scope (equal (svar-register-indnamememo x (modscope-fix scope) moddb indnamememo) (svar-register-indnamememo x scope moddb indnamememo)))
Theorem:
(defthm svar-register-indnamememo-modscope-equiv-congruence-on-scope (implies (modscope-equiv scope scope-equiv) (equal (svar-register-indnamememo x scope moddb indnamememo) (svar-register-indnamememo x scope-equiv moddb indnamememo))) :rule-classes :congruence)
Theorem:
(defthm svar-register-indnamememo-of-moddb-fix-moddb (equal (svar-register-indnamememo x scope (moddb-fix moddb) indnamememo) (svar-register-indnamememo x scope moddb indnamememo)))
Theorem:
(defthm svar-register-indnamememo-moddb-equiv-congruence-on-moddb (implies (moddb-equiv moddb moddb-equiv) (equal (svar-register-indnamememo x scope moddb indnamememo) (svar-register-indnamememo x scope moddb-equiv indnamememo))) :rule-classes :congruence)