Lemmas about atom-listp available in the std/typed-lists library.
Most of these are generated automatically with std::deflist.
Theorem:
(defthm atom-listp-of-cons (equal (atom-listp (cons a x)) (and (not (consp a)) (atom-listp x))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-cdr-when-atom-listp (implies (atom-listp (double-rewrite x)) (atom-listp (cdr x))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-when-not-consp (implies (not (consp x)) (equal (atom-listp x) (not x))) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-of-car-when-atom-listp (implies (atom-listp x) (not (consp (car x)))) :rule-classes ((:rewrite :backchain-limit-lst 0)))
Theorem:
(defthm true-listp-when-atom-listp-compound-recognizer (implies (atom-listp x) (true-listp x)) :rule-classes :compound-recognizer)
Theorem:
(defthm atom-listp-of-list-fix (implies (atom-listp x) (atom-listp (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-sfix (iff (atom-listp (set::sfix x)) (or (atom-listp x) (not (set::setp x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-insert (iff (atom-listp (set::insert a x)) (and (atom-listp (set::sfix x)) (not (consp a)))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-delete (implies (atom-listp x) (atom-listp (set::delete k x))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-mergesort (iff (atom-listp (set::mergesort x)) (atom-listp (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-union (iff (atom-listp (set::union x y)) (and (atom-listp (set::sfix x)) (atom-listp (set::sfix y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-intersect-1 (implies (atom-listp x) (atom-listp (set::intersect x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-intersect-2 (implies (atom-listp y) (atom-listp (set::intersect x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-difference (implies (atom-listp x) (atom-listp (set::difference x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-duplicated-members (implies (atom-listp x) (atom-listp (duplicated-members x))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-rev (equal (atom-listp (rev x)) (atom-listp (list-fix x))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-append (equal (atom-listp (append a b)) (and (atom-listp (list-fix a)) (atom-listp b))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-rcons (iff (atom-listp (rcons a x)) (and (not (consp a)) (atom-listp (list-fix x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-when-member-equal-of-atom-listp (and (implies (and (member-equal a x) (atom-listp x)) (not (consp a))) (implies (and (atom-listp x) (member-equal a x)) (not (consp a)))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-when-subsetp-equal (and (implies (and (subsetp-equal x y) (atom-listp y)) (equal (atom-listp x) (true-listp x))) (implies (and (atom-listp y) (subsetp-equal x y)) (equal (atom-listp x) (true-listp x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-set-difference-equal (implies (atom-listp x) (atom-listp (set-difference-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-intersection-equal-1 (implies (atom-listp (double-rewrite x)) (atom-listp (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-intersection-equal-2 (implies (atom-listp (double-rewrite y)) (atom-listp (intersection-equal x y))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-union-equal (equal (atom-listp (union-equal x y)) (and (atom-listp (list-fix x)) (atom-listp (double-rewrite y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-take (implies (atom-listp (double-rewrite x)) (iff (atom-listp (take n x)) (or (not (consp nil)) (<= (nfix n) (len x))))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-repeat (iff (atom-listp (repeat n x)) (or (not (consp x)) (zp n))) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-of-nth-when-atom-listp (implies (atom-listp x) (not (consp (nth n x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-update-nth (implies (atom-listp (double-rewrite x)) (iff (atom-listp (update-nth n y x)) (and (not (consp y)) (or (<= (nfix n) (len x)) (not (consp nil)))))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-butlast (implies (atom-listp (double-rewrite x)) (atom-listp (butlast x n))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-nthcdr (implies (atom-listp (double-rewrite x)) (atom-listp (nthcdr n x))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-last (implies (atom-listp (double-rewrite x)) (atom-listp (last x))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-remove (implies (atom-listp x) (atom-listp (remove a x))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-revappend (equal (atom-listp (revappend x y)) (and (atom-listp (list-fix x)) (atom-listp y))) :rule-classes ((:rewrite)))
Theorem:
(defthm atom-listp-of-remove-equal (implies (atom-listp x) (atom-listp (remove-equal a x))))
Theorem:
(defthm atom-listp-of-make-list-ac (equal (atom-listp (make-list-ac n x ac)) (and (atom-listp ac) (or (atom x) (zp n)))))