A direct numeric value notation is well-formed iff it consists of at least one number; a range numeric value notation is well-formed iff the minimum does not exceed the maximum.
The condition on direct numeric value notations is required
by the rules
Function:
(defun num-val-wfp (num-val) (declare (xargs :guard (num-val-p num-val))) (num-val-case num-val :direct (consp num-val.get) :range (<= num-val.min num-val.max)))
Theorem:
(defthm booleanp-of-num-val-wfp (b* ((yes/no (num-val-wfp num-val))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm justification-for-num-val-range-wfp (implies (and (num-val-case num-val :range) (> (num-val-range->min num-val) (num-val-range->max num-val))) (not (tree-match-num-val-p tree num-val))))