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