Built-in theorems about lists.
Theorem:
(defthm symbol-listp-forward-to-true-listp (implies (symbol-listp x) (true-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm true-listp-append (implies (true-listp b) (true-listp (append a b))) :rule-classes :type-prescription)
Theorem:
(defthm append-to-nil (implies (true-listp x) (equal (append x nil) x)))
Theorem:
(defthm character-listp-forward-to-eqlable-listp (implies (character-listp x) (eqlable-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm standard-char-listp-forward-to-character-listp (implies (standard-char-listp x) (character-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm atom-listp-forward-to-true-listp (implies (atom-listp x) (true-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm eqlable-listp-forward-to-atom-listp (implies (eqlable-listp x) (atom-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm good-atom-listp-forward-to-atom-listp (implies (good-atom-listp x) (atom-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm true-listp-revappend-type-prescription (implies (true-listp y) (true-listp (revappend x y))) :rule-classes :type-prescription)
Theorem:
(defthm true-listp-take (true-listp (take n l)) :rule-classes :type-prescription)
Theorem:
(defthm keyword-value-listp-forward-to-true-listp (implies (keyword-value-listp x) (true-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm true-list-listp-forward-to-true-listp (implies (true-list-listp x) (true-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm true-listp-nthcdr-type-prescription (implies (true-listp x) (true-listp (nthcdr n x))) :rule-classes :type-prescription)
Theorem:
(defthm keyword-value-listp-assoc-keyword (implies (keyword-value-listp l) (keyword-value-listp (assoc-keyword key l))) :rule-classes ((:forward-chaining :trigger-terms ((assoc-keyword key l)))))
Theorem:
(defthm acl2-number-listp-forward-to-true-listp (implies (acl2-number-listp x) (true-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm rational-listp-forward-to-acl2-number-listp (implies (rational-listp x) (acl2-number-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm integer-listp-forward-to-rational-listp (implies (integer-listp x) (rational-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm nat-listp-forward-to-integer-listp (implies (nat-listp x) (integer-listp x)) :rule-classes :forward-chaining)
Theorem:
(defthm nth-update-nth (equal (nth m (update-nth n val l)) (if (equal (nfix m) (nfix n)) val (nth m l))))
Theorem:
(defthm true-listp-update-nth (implies (true-listp l) (true-listp (update-nth key val l))) :rule-classes :type-prescription)
Theorem:
(defthm nth-update-nth-array (equal (nth m (update-nth-array n i val l)) (if (equal (nfix m) (nfix n)) (update-nth i val (nth m l)) (nth m l))))
Theorem:
(defthm len-update-nth (equal (len (update-nth n val x)) (max (1+ (nfix n)) (len x))))
Theorem:
(defthm nth-0-cons (equal (nth 0 (cons a l)) a))
Theorem:
(defthm nth-add1 (implies (and (integerp n) (>= n 0)) (equal (nth (+ 1 n) (cons a l)) (nth n l))))
Theorem:
(defthm pairlis$-true-list-fix (equal (pairlis$ x (true-list-fix y)) (pairlis$ x y)))