A
Function:
(defun abstract-num-val (tree) (declare (xargs :guard (treep tree))) (b* (((fun (fail)) (prog2$ (abstract-fail) (num-val-direct (num-base-bin) nil))) ((unless (tree-case tree :nonleaf)) (fail)) (treess (tree-nonleaf->branches tree)) ((unless (and (consp treess) (consp (cdr treess)))) (fail)) (trees (cadr treess)) ((unless (consp trees)) (fail)) (subtree (car trees))) (abstract-bin/dec/hex-val subtree)))
Theorem:
(defthm num-val-p-of-abstract-num-val (b* ((num-val (abstract-num-val tree))) (num-val-p num-val)) :rule-classes :rewrite)