Lemmas about alistp available in the std/alists library.
Note that "modern" alist functions do not have
Theorem:
(defthm alistp-when-atom (implies (atom x) (equal (alistp x) (not x))))
Theorem:
(defthm alistp-of-cons (equal (alistp (cons a x)) (and (consp a) (alistp x))))
Theorem:
(defthm true-listp-when-alistp (implies (alistp x) (true-listp x)) :rule-classes :compound-recognizer)
Theorem:
(defthm true-listp-when-alistp-rewrite (implies (alistp x) (true-listp x)))
Theorem:
(defthm alistp-of-append (equal (alistp (append x y)) (and (alistp (list-fix x)) (alistp y))))
Theorem:
(defthm alistp-of-revappend (equal (alistp (revappend x y)) (and (alistp (list-fix x)) (alistp y))))
Theorem:
(defthm alistp-of-rev (equal (alistp (rev x)) (alistp (list-fix x))))
Theorem:
(defthm alistp-of-reverse (equal (alistp (reverse x)) (and (not (stringp x)) (alistp (list-fix x)))))
Theorem:
(defthm alistp-of-cdr (implies (alistp x) (alistp (cdr x))))
Theorem:
(defthm consp-of-car-when-alistp (implies (alistp x) (equal (consp (car x)) (if x t nil))))
Theorem:
(defthm alistp-of-member (implies (alistp x) (alistp (member a x))))
Theorem:
(defthm alistp-of-repeat (equal (alistp (repeat n x)) (or (zp n) (consp x))))
Theorem:
(defthm alistp-of-take (implies (alistp x) (equal (alistp (take n x)) (<= (nfix n) (len x)))))
Theorem:
(defthm alistp-of-nthcdr (implies (alistp x) (alistp (nthcdr n x))))
Theorem:
(defthm alistp-of-remove1-assoc-equal (implies (alistp x) (alistp (remove1-assoc-equal key x))))
Theorem:
(defthm alistp-of-pairlis$ (alistp (pairlis$ x y)))