Lemmas about random$ available in the system/random book.
Theorem:
(defthm natp-random$-better (natp (mv-nth 0 (random$ limit state))) :rule-classes :type-prescription)
Theorem:
(defthm random$-linear-better (and (<= 0 (mv-nth 0 (random$ n state))) (implies (posp n) (< (mv-nth 0 (random$ n state)) n))))
Theorem:
(defthm state-p1-of-random (implies (force (state-p1 state)) (state-p1 (mv-nth 1 (random$ limit state)))))