Generate a list of random numbers in [0, limit).
Function:
(defun random-list (n limit state) (declare (xargs :guard (and (natp n) (posp limit)))) (random-list-aux n limit nil state))
Theorem:
(defthm nat-listp-of-random-list (nat-listp (mv-nth 0 (random-list n limit state))))
Theorem:
(defthm state-p1-of-random-list (implies (force (state-p1 state)) (state-p1 (mv-nth 1 (random-list n limit state)))))