Construct an AIG that captures: when does an a4vec evaluate to a 2vec-p?
(a2vec-p x) → aig
This is a supporting function that is widely used by many of our a4vec-operations. For instance, operations like 4vec-plus return all Xes when there are any X/Z bits.
Function:
(defun a2vec-p (x) (declare (xargs :guard (a4vec-p x))) (let ((__function__ 'a2vec-p)) (declare (ignorable __function__)) (b* (((a4vec x))) (aig-=-ss x.upper x.lower))))
Theorem:
(defthm a2vec-p-correct (equal (aig-eval (a2vec-p x) env) (2vec-p (a4vec-eval x env))))
Theorem:
(defthm a2vec-p-of-a4vec-fix-x (equal (a2vec-p (a4vec-fix x)) (a2vec-p x)))
Theorem:
(defthm a2vec-p-a4vec-equiv-congruence-on-x (implies (a4vec-equiv x x-equiv) (equal (a2vec-p x) (a2vec-p x-equiv))) :rule-classes :congruence)