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