Function:
(defun 4vmask-to-a4vec-env (mask boolmask val nextvar) (declare (xargs :guard (and (4vmask-p mask) (integerp boolmask) (4vec-p val) (natp nextvar)))) (declare (xargs :guard (not (sparseint-< mask 0)))) (let ((__function__ '4vmask-to-a4vec-env)) (declare (ignorable __function__)) (4vmask-to-a4vec-rec-env mask boolmask (4vec->upper val) (4vec->lower val) nextvar)))
Theorem:
(defthm key-exists-in-4vmask-to-a4vec-env (iff (hons-assoc-equal v (4vmask-to-a4vec-env mask boolmask val nextvar)) (and (natp v) (<= (nfix nextvar) v) (< v (+ (nfix nextvar) (4vmask-to-a4vec-varcount mask boolmask))))))
Theorem:
(defthm eval-4vmask-to-a4vec-with-env (b* ((vala (4vmask-to-a4vec mask boolmask nextvar)) (env (4vmask-to-a4vec-env mask boolmask val nextvar))) (implies (and (4vec-boolmaskp val boolmask) (4vmask-p mask) (natp (sparseint-val mask))) (equal (4vec-mask mask (a4vec-eval vala env)) (4vec-mask mask val)))))
Theorem:
(defthm 4vmask-to-a4vec-env-of-4vmask-fix-mask (equal (4vmask-to-a4vec-env (4vmask-fix mask) boolmask val nextvar) (4vmask-to-a4vec-env mask boolmask val nextvar)))
Theorem:
(defthm 4vmask-to-a4vec-env-4vmask-equiv-congruence-on-mask (implies (4vmask-equiv mask mask-equiv) (equal (4vmask-to-a4vec-env mask boolmask val nextvar) (4vmask-to-a4vec-env mask-equiv boolmask val nextvar))) :rule-classes :congruence)
Theorem:
(defthm 4vmask-to-a4vec-env-of-ifix-boolmask (equal (4vmask-to-a4vec-env mask (ifix boolmask) val nextvar) (4vmask-to-a4vec-env mask boolmask val nextvar)))
Theorem:
(defthm 4vmask-to-a4vec-env-int-equiv-congruence-on-boolmask (implies (int-equiv boolmask boolmask-equiv) (equal (4vmask-to-a4vec-env mask boolmask val nextvar) (4vmask-to-a4vec-env mask boolmask-equiv val nextvar))) :rule-classes :congruence)
Theorem:
(defthm 4vmask-to-a4vec-env-of-4vec-fix-val (equal (4vmask-to-a4vec-env mask boolmask (4vec-fix val) nextvar) (4vmask-to-a4vec-env mask boolmask val nextvar)))
Theorem:
(defthm 4vmask-to-a4vec-env-4vec-equiv-congruence-on-val (implies (4vec-equiv val val-equiv) (equal (4vmask-to-a4vec-env mask boolmask val nextvar) (4vmask-to-a4vec-env mask boolmask val-equiv nextvar))) :rule-classes :congruence)
Theorem:
(defthm 4vmask-to-a4vec-env-of-nfix-nextvar (equal (4vmask-to-a4vec-env mask boolmask val (nfix nextvar)) (4vmask-to-a4vec-env mask boolmask val nextvar)))
Theorem:
(defthm 4vmask-to-a4vec-env-nat-equiv-congruence-on-nextvar (implies (nat-equiv nextvar nextvar-equiv) (equal (4vmask-to-a4vec-env mask boolmask val nextvar) (4vmask-to-a4vec-env mask boolmask val nextvar-equiv))) :rule-classes :congruence)