(first-n n x) is logically identical to
Reasoning Note. We leave
Function:
(defun first-n (n x) (declare (xargs :guard (natp n))) (mbe :logic (take n x) :exec (cond ((zp n) nil) ((atom x) (make-list n)) (t (cons (car x) (first-n (- n 1) (cdr x)))))))