A
The parse tree must be a leaf labeled by a list of one natural number. That natural number is returned.
Function:
(defun abstract-terminal (tree) (declare (xargs :guard (treep tree))) (b* ((nats (abstract-terminals tree))) (if (consp nats) (car nats) (prog2$ (abstract-fail) 0))))
Theorem:
(defthm natp-of-abstract-terminal (b* ((nat (abstract-terminal tree))) (natp nat)) :rule-classes (:rewrite :type-prescription))