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