A
(abstract-repeat tree) → range
The two alternatives of the
Function:
(defun abstract-repeat (tree) (declare (xargs :guard (treep tree))) (b* (((fun (fail)) (prog2$ (abstract-fail) (repeat-range 0 (nati-finite 0)))) ((unless (tree-case tree :nonleaf)) (fail)) (treess (tree-nonleaf->branches tree)) ((unless (consp treess)) (fail)) (trees (car treess)) ((unless (consp trees)) (fail)) (1st-subtree (car trees)) ((unless (tree-case 1st-subtree :nonleaf)) (fail))) (if (tree-nonleaf->rulename? 1st-subtree) (b* ((num (abstract-*digit trees))) (make-repeat-range :min num :max (nati-finite num))) (b* (((mv min max) (abstract-*digit-star-*digit 1st-subtree))) (make-repeat-range :min min :max max)))))
Theorem:
(defthm repeat-rangep-of-abstract-repeat (b* ((range (abstract-repeat tree))) (repeat-rangep range)) :rule-classes :rewrite)