Symbolic version of 4vec-onehot.
Function:
(defun a4vec-onehot (x) (declare (xargs :guard (a4vec-p x))) (let ((__function__ 'a4vec-onehot)) (declare (ignorable __function__)) (a4vec-ite (aig-and (a2vec-p x) (aig-not (aig-sign-s (a4vec->upper x)))) (b* (((mv ?zero one) (aig-onehot-aux (a4vec->upper x))) (val (aig-scons one nil))) (a4vec val val)) (a4vec-x))))
Theorem:
(defthm a4vec-p-of-a4vec-onehot (b* ((res (a4vec-onehot x))) (a4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm a4vec-onehot-correct (equal (a4vec-eval (a4vec-onehot x) env) (4vec-onehot (a4vec-eval x env))))
Theorem:
(defthm a4vec-onehot-of-a4vec-fix-x (equal (a4vec-onehot (a4vec-fix x)) (a4vec-onehot x)))
Theorem:
(defthm a4vec-onehot-a4vec-equiv-congruence-on-x (implies (a4vec-equiv x x-equiv) (equal (a4vec-onehot x) (a4vec-onehot x-equiv))) :rule-classes :congruence)