Lemmas about character-listp available in the std/typed-lists library.

Most of these are generated automatically with std::deflist.

**Theorem: **

(defthm character-listp-of-cons (equal (character-listp (cons a x)) (and (characterp a) (character-listp x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-cdr-when-character-listp (implies (character-listp (double-rewrite x)) (character-listp (cdr x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-when-not-consp (implies (not (consp x)) (equal (character-listp x) (not x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm characterp-of-car-when-character-listp (implies (character-listp x) (iff (characterp (car x)) (consp x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm true-listp-when-character-listp-compound-recognizer (implies (character-listp x) (true-listp x)) :rule-classes :compound-recognizer)

**Theorem: **

(defthm character-listp-of-list-fix (implies (character-listp x) (character-listp (list-fix x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-sfix (iff (character-listp (set::sfix x)) (or (character-listp x) (not (set::setp x)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-insert (iff (character-listp (set::insert a x)) (and (character-listp (set::sfix x)) (characterp a))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-delete (implies (character-listp x) (character-listp (set::delete k x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-mergesort (iff (character-listp (set::mergesort x)) (character-listp (list-fix x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-union (iff (character-listp (set::union x y)) (and (character-listp (set::sfix x)) (character-listp (set::sfix y)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-intersect-1 (implies (character-listp x) (character-listp (set::intersect x y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-intersect-2 (implies (character-listp y) (character-listp (set::intersect x y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-difference (implies (character-listp x) (character-listp (set::difference x y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-duplicated-members (implies (character-listp x) (character-listp (duplicated-members x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-rev (equal (character-listp (rev x)) (character-listp (list-fix x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-append (equal (character-listp (append a b)) (and (character-listp (list-fix a)) (character-listp b))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-rcons (iff (character-listp (rcons a x)) (and (characterp a) (character-listp (list-fix x)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm characterp-when-member-equal-of-character-listp (and (implies (and (member-equal a x) (character-listp x)) (characterp a)) (implies (and (character-listp x) (member-equal a x)) (characterp a))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-when-subsetp-equal (and (implies (and (subsetp-equal x y) (character-listp y)) (equal (character-listp x) (true-listp x))) (implies (and (character-listp y) (subsetp-equal x y)) (equal (character-listp x) (true-listp x)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-set-difference-equal (implies (character-listp x) (character-listp (set-difference-equal x y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-intersection-equal-1 (implies (character-listp (double-rewrite x)) (character-listp (intersection-equal x y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-intersection-equal-2 (implies (character-listp (double-rewrite y)) (character-listp (intersection-equal x y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-union-equal (equal (character-listp (union-equal x y)) (and (character-listp (list-fix x)) (character-listp (double-rewrite y)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-take (implies (character-listp (double-rewrite x)) (iff (character-listp (take n x)) (or (characterp nil) (<= (nfix n) (len x))))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-repeat (iff (character-listp (repeat n x)) (or (characterp x) (zp n))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm characterp-of-nth-when-character-listp (implies (character-listp x) (iff (characterp (nth n x)) (< (nfix n) (len x)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-update-nth (implies (character-listp (double-rewrite x)) (iff (character-listp (update-nth n y x)) (and (characterp y) (or (<= (nfix n) (len x)) (characterp nil))))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-butlast (implies (character-listp (double-rewrite x)) (character-listp (butlast x n))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-nthcdr (implies (character-listp (double-rewrite x)) (character-listp (nthcdr n x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-last (implies (character-listp (double-rewrite x)) (character-listp (last x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-remove (implies (character-listp x) (character-listp (remove a x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm character-listp-of-revappend (equal (character-listp (revappend x y)) (and (character-listp (list-fix x)) (character-listp y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm true-listp-when-character-listp-rewrite (implies (character-listp x) (true-listp x)) :rule-classes ((:rewrite :backchain-limit-lst 1)))

**Theorem: **

(defthm character-listp-of-remove-equal (implies (character-listp x) (character-listp (remove-equal a x))))

**Theorem: **

(defthm character-listp-of-make-list-ac (equal (character-listp (make-list-ac n x ac)) (and (character-listp ac) (or (characterp x) (zp n)))))

**Theorem: **

(defthm eqlable-listp-when-character-listp (implies (character-listp x) (eqlable-listp x)))