Symbolic version of 4vec-onehot0.
Function:
(defun a4vec-onehot0 (x) (declare (xargs :guard (a4vec-p x))) (let ((__function__ 'a4vec-onehot0)) (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))) (ok (aig-or zero one)) (val (aig-scons ok nil))) (a4vec val val)) (a4vec-x))))
Theorem:
(defthm a4vec-p-of-a4vec-onehot0 (b* ((res (a4vec-onehot0 x))) (a4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm a4vec-onehot0-correct (equal (a4vec-eval (a4vec-onehot0 x) env) (4vec-onehot0 (a4vec-eval x env))))
Theorem:
(defthm a4vec-onehot0-of-a4vec-fix-x (equal (a4vec-onehot0 (a4vec-fix x)) (a4vec-onehot0 x)))
Theorem:
(defthm a4vec-onehot0-a4vec-equiv-congruence-on-x (implies (a4vec-equiv x x-equiv) (equal (a4vec-onehot0 x) (a4vec-onehot0 x-equiv))) :rule-classes :congruence)