(aig-onehot-aux x) → (mv zero one)
Function:
(defun aig-onehot-aux (x) (declare (xargs :guard (true-listp x))) (let ((__function__ 'aig-onehot-aux)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv t nil)) ((mv zero one) (aig-onehot-aux (cdr x)))) (mv (aig-and zero (aig-not (car x))) (aig-ite (car x) zero one)))))
Theorem:
(defthm aig-onehot-aux-zero-correct (b* (((mv acl2::?zero ?one) (aig-onehot-aux x))) (equal (aig-eval zero env) (equal (logcount (aig-list->u x env)) 0))))
Theorem:
(defthm aig-onehot-aux-one-correct (b* (((mv acl2::?zero ?one) (aig-onehot-aux x))) (equal (aig-eval one env) (equal (logcount (aig-list->u x env)) 1))))
Theorem:
(defthm aig-onehot-aux-of-list-fix-x (equal (aig-onehot-aux (list-fix x)) (aig-onehot-aux x)))
Theorem:
(defthm aig-onehot-aux-list-equiv-congruence-on-x (implies (list-equiv x x-equiv) (equal (aig-onehot-aux x) (aig-onehot-aux x-equiv))) :rule-classes :congruence)