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