(svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar) → (mv err new-nextvar)
Function:
(defun svex-varmasks/env->aig-env-stats-rec (vars masks boolmasks nextvar) (declare (xargs :guard (and (svarlist-p vars) (svex-mask-alist-p masks) (svar-boolmasks-p boolmasks) (natp nextvar)))) (let ((__function__ 'svex-varmasks/env->aig-env-stats-rec)) (declare (ignorable __function__)) (b* (((when (atom vars)) (mv nil (lnfix nextvar))) (mask (svex-mask-lookup (svex-var (car vars)) masks)) ((when (sparseint-< mask 0)) (mv (msg "Negative mask: ~x0~%" (svar-fix (car vars))) (lnfix nextvar))) (boolmask (svar-boolmasks-lookup (car vars) boolmasks)) (nextvar (+ (lnfix nextvar) (4vmask-to-a4vec-varcount mask boolmask)))) (svex-varmasks/env->aig-env-stats-rec (cdr vars) masks boolmasks nextvar))))
Theorem:
(defthm natp-of-svex-varmasks/env->aig-env-stats-rec.new-nextvar (b* (((mv ?err ?new-nextvar) (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar))) (natp new-nextvar)) :rule-classes :rewrite)
Theorem:
(defthm svex-varmasks/env->aig-env-stats-rec-of-svarlist-fix-vars (equal (svex-varmasks/env->aig-env-stats-rec (svarlist-fix vars) masks boolmasks nextvar) (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar)))
Theorem:
(defthm svex-varmasks/env->aig-env-stats-rec-svarlist-equiv-congruence-on-vars (implies (svarlist-equiv vars vars-equiv) (equal (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar) (svex-varmasks/env->aig-env-stats-rec vars-equiv masks boolmasks nextvar))) :rule-classes :congruence)
Theorem:
(defthm svex-varmasks/env->aig-env-stats-rec-of-svex-mask-alist-fix-masks (equal (svex-varmasks/env->aig-env-stats-rec vars (svex-mask-alist-fix masks) boolmasks nextvar) (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar)))
Theorem:
(defthm svex-varmasks/env->aig-env-stats-rec-svex-mask-alist-equiv-congruence-on-masks (implies (svex-mask-alist-equiv masks masks-equiv) (equal (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar) (svex-varmasks/env->aig-env-stats-rec vars masks-equiv boolmasks nextvar))) :rule-classes :congruence)
Theorem:
(defthm svex-varmasks/env->aig-env-stats-rec-of-svar-boolmasks-fix-boolmasks (equal (svex-varmasks/env->aig-env-stats-rec vars masks (svar-boolmasks-fix boolmasks) nextvar) (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar)))
Theorem:
(defthm svex-varmasks/env->aig-env-stats-rec-svar-boolmasks-equiv-congruence-on-boolmasks (implies (svar-boolmasks-equiv boolmasks boolmasks-equiv) (equal (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar) (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks-equiv nextvar))) :rule-classes :congruence)
Theorem:
(defthm svex-varmasks/env->aig-env-stats-rec-of-nfix-nextvar (equal (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks (nfix nextvar)) (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar)))
Theorem:
(defthm svex-varmasks/env->aig-env-stats-rec-nat-equiv-congruence-on-nextvar (implies (nat-equiv nextvar nextvar-equiv) (equal (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar) (svex-varmasks/env->aig-env-stats-rec vars masks boolmasks nextvar-equiv))) :rule-classes :congruence)