A list of zero or more
(abstract-*bit trees) → nat
Function:
(defun abstract-*bit-aux (trees accumulator) (declare (xargs :guard (and (tree-listp trees) (natp accumulator)))) (b* (((when (endp trees)) (nfix accumulator)) (bit (abstract-bit (car trees)))) (abstract-*bit-aux (cdr trees) (+ (* 2 accumulator) bit))))
Theorem:
(defthm natp-of-abstract-*bit-aux (b* ((nat (abstract-*bit-aux trees accumulator))) (natp nat)) :rule-classes :rewrite)
Function:
(defun abstract-*bit (trees) (declare (xargs :guard (tree-listp trees))) (abstract-*bit-aux trees 0))
Theorem:
(defthm natp-of-abstract-*bit (b* ((nat (abstract-*bit trees))) (natp nat)) :rule-classes :rewrite)