(tuple-listp n x) recognizes a list of nil-terminated n-tuples.
Function: tuple-listp
(defun tuple-listp (n x) (declare (xargs :guard (natp n))) (if (consp x) (and (tuplep n (car x)) (tuple-listp n (cdr x))) t))