(svar-map-named->indexed x modidx moddb) → (mv errmsg xx)
Function:
(defun svar-map-named->indexed (x modidx moddb) (declare (xargs :stobjs (moddb))) (declare (xargs :guard (and (svar-map-p x) (natp modidx) (moddb-ok moddb)))) (declare (xargs :guard (and (svarlist-addr-p (svar-map-vars x)) (< modidx (moddb->nmods moddb))))) (let ((__function__ 'svar-map-named->indexed)) (declare (ignorable __function__)) (b* ((x (svar-map-fix x)) ((when (atom x)) (mv nil nil)) ((cons lhs rhs) (car x)) ((mv err1 lhs) (svar-named->indexed lhs modidx moddb)) ((mv err2 rhs) (svar-named->indexed rhs modidx moddb)) ((mv err3 rest) (svar-map-named->indexed (cdr x) modidx moddb))) (mv (or err1 err2 err3) (cons (cons lhs rhs) rest)))))
Theorem:
(defthm svar-map-p-of-svar-map-named->indexed.xx (b* (((mv ?errmsg ?xx) (svar-map-named->indexed x modidx moddb))) (svar-map-p xx)) :rule-classes :rewrite)
Theorem:
(defthm svar-map-named->indexed-of-svar-map-fix-x (equal (svar-map-named->indexed (svar-map-fix x) modidx moddb) (svar-map-named->indexed x modidx moddb)))
Theorem:
(defthm svar-map-named->indexed-svar-map-equiv-congruence-on-x (implies (svar-map-equiv x x-equiv) (equal (svar-map-named->indexed x modidx moddb) (svar-map-named->indexed x-equiv modidx moddb))) :rule-classes :congruence)
Theorem:
(defthm svar-map-named->indexed-of-nfix-modidx (equal (svar-map-named->indexed x (nfix modidx) moddb) (svar-map-named->indexed x modidx moddb)))
Theorem:
(defthm svar-map-named->indexed-nat-equiv-congruence-on-modidx (implies (nat-equiv modidx modidx-equiv) (equal (svar-map-named->indexed x modidx moddb) (svar-map-named->indexed x modidx-equiv moddb))) :rule-classes :congruence)
Theorem:
(defthm svar-map-named->indexed-of-moddb-fix-moddb (equal (svar-map-named->indexed x modidx (moddb-fix moddb)) (svar-map-named->indexed x modidx moddb)))
Theorem:
(defthm svar-map-named->indexed-moddb-equiv-congruence-on-moddb (implies (moddb-equiv moddb moddb-equiv) (equal (svar-map-named->indexed x modidx moddb) (svar-map-named->indexed x modidx moddb-equiv))) :rule-classes :congruence)
Theorem:
(defthm svar-map-idxaddr-okp-of-svar-map-named->indexed (b* (((mv err ans) (svar-map-named->indexed x modidx moddb))) (implies (and (moddb-ok moddb) (< (nfix modidx) (nfix (nth *moddb->nmods* moddb))) (not err)) (svarlist-idxaddr-okp (svar-map-vars ans) (moddb-mod-totalwires modidx moddb)))))