(take-pairs list) → alist
Function:
(defun take-pairs (list) (declare (xargs :guard (true-listp list))) (let ((__function__ 'take-pairs)) (declare (ignorable __function__)) (if (endp list) nil (if (consp (rest list)) (cons (cons (first list) (second list)) (take-pairs (rest (rest list)))) (list (cons (first list) nil))))))
Theorem:
(defthm alistp-of-take-pairs (b* ((alist (take-pairs list))) (alistp alist)) :rule-classes :rewrite)