Recognizer for num-range structures.
(num-range-p x) → *
Function:
(defun num-range-p (x) (declare (xargs :guard t)) (let ((__function__ 'num-range-p)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(base min max))) :exec (fty::alist-with-carsp x '(base min max))) (b* ((base (cdr (std::da-nth 0 x))) (min (cdr (std::da-nth 1 x))) (max (cdr (std::da-nth 2 x)))) (and (num-base-p base) (natp min) (natp max))))))
Theorem:
(defthm consp-when-num-range-p (implies (num-range-p x) (consp x)) :rule-classes :compound-recognizer)