A list of zero or more
(abstract-*-grouped-terminal trees) → nats
Each parse tree must have a root labeled by no rule name, with a single leaf subtree labeled by a list of one natural number. That natural number is returned in correspondence to the parse tree.
Function:
(defun abstract-*-grouped-terminal (trees) (declare (xargs :guard (tree-listp trees))) (b* (((fun (fail)) (prog2$ (abstract-fail) nil)) ((when (endp trees)) nil) ((cons tree trees) trees) (nat (abstract-grouped-terminal tree)) (nats (abstract-*-grouped-terminal trees))) (cons nat nats)))
Theorem:
(defthm nat-listp-of-abstract-*-grouped-terminal (b* ((nats (abstract-*-grouped-terminal trees))) (nat-listp nats)) :rule-classes :rewrite)