Alternate substitution operation for 4v-sexprs.
(4v-sexpr-compose x al) is takes a sexpr,
We construct a new sexpr by copying
We memoize this function, but this only helps when you are composing
with the same alist. We don't use
Function:
(defun 4v-sexpr-compose (x al) (declare (xargs :guard t)) (if (atom x) (and x (let ((look (hons-get x al))) (and look (cdr look)))) (hons (car x) (4v-sexpr-compose-list (cdr x) al))))
Function:
(defun 4v-sexpr-compose-list (x al) (declare (xargs :guard t)) (if (atom x) x (hons (4v-sexpr-compose (car x) al) (4v-sexpr-compose-list (cdr x) al))))
Function:
(defun 4v-sexpr-compose-memoize-condition (x al) (declare (ignorable x al) (xargs :guard 't)) (and (consp x) (consp (cdr x))))
Theorem:
(defthm 4v-sexpr-eval-4v-sexpr-compose (equal (4v-sexpr-eval (4v-sexpr-compose x al) env) (4v-sexpr-eval x (4v-sexpr-eval-alist al env))))
Theorem:
(defthm 4v-sexpr-eval-list-4v-sexpr-compose-list (equal (4v-sexpr-eval-list (4v-sexpr-compose-list x al) env) (4v-sexpr-eval-list x (4v-sexpr-eval-alist al env))))