(aig-compose x sigma) performs variable substitution throughout the AIG
x, unconditionally replacing every variable in x with its
binding in sigma.
(aig-compose x sigma) → aig
- x — The AIG to compose into.
- sigma — A fast alist that should bind variables to replacement AIGs.
- aig — Modified version of x where every variable is replaced with its
binding in sigma or t if it has no binding.
The name sigma is intended to evoke the notion of substitution
lists in logic. This operation is similar to aig-restrict, except that
whereas aig-restrict leaves unbound variables alone, aig-compose
replaces them with t. This has the logically nice property that the
variables after composition are just the variables in the AIGs of
This function is memoized. You should typically free its memo table
after you are done with whatever sigma you are using, to avoid excessive
memory usage. (We don't use :forget t because you often want to compose
several related AIGs.)
Definitions and Theorems
aig-compose (x sigma)
(declare (xargs :guard t))
(declare (ignorable __function__))
:var (aig-alist-lookup x sigma)
:inv (aig-not (aig-compose (car x) sigma))
:and (let ((a (aig-compose (car x) sigma)))
(aig-and a (aig-compose (cdr x) sigma)))))))
(defun aig-compose-memoize-condition (x sigma)
(declare (ignorable x sigma)
(xargs :guard 't))
(and (consp x) (cdr x)))
- Basic theorems about aig-compose.