Basic theorems about pos-listp, generated by deflist.
Theorem:
(defthm pos-listp-of-cons (equal (pos-listp (cons acl2::a acl2::x)) (and (posp acl2::a) (pos-listp acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-cdr-when-pos-listp (implies (pos-listp (double-rewrite acl2::x)) (pos-listp (cdr acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-when-not-consp (implies (not (consp acl2::x)) (pos-listp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm posp-of-car-when-pos-listp (implies (pos-listp acl2::x) (iff (posp (car acl2::x)) (consp acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-append (equal (pos-listp (append acl2::a acl2::b)) (and (pos-listp acl2::a) (pos-listp acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-list-fix (equal (pos-listp (list-fix acl2::x)) (pos-listp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-sfix (iff (pos-listp (sfix acl2::x)) (or (pos-listp acl2::x) (not (setp acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-insert (iff (pos-listp (insert acl2::a acl2::x)) (and (pos-listp (sfix acl2::x)) (posp acl2::a))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-delete (implies (pos-listp acl2::x) (pos-listp (delete acl2::k acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-mergesort (iff (pos-listp (mergesort acl2::x)) (pos-listp (list-fix acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-union (iff (pos-listp (union acl2::x acl2::y)) (and (pos-listp (sfix acl2::x)) (pos-listp (sfix acl2::y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-intersect-1 (implies (pos-listp acl2::x) (pos-listp (intersect acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-intersect-2 (implies (pos-listp acl2::y) (pos-listp (intersect acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-difference (implies (pos-listp acl2::x) (pos-listp (difference acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-duplicated-members (implies (pos-listp acl2::x) (pos-listp (duplicated-members acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-rev (equal (pos-listp (rev acl2::x)) (pos-listp (list-fix acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-rcons (iff (pos-listp (acl2::rcons acl2::a acl2::x)) (and (posp acl2::a) (pos-listp (list-fix acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm posp-when-member-equal-of-pos-listp (and (implies (and (member-equal acl2::a acl2::x) (pos-listp acl2::x)) (posp acl2::a)) (implies (and (pos-listp acl2::x) (member-equal acl2::a acl2::x)) (posp acl2::a))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-when-subsetp-equal (and (implies (and (subsetp-equal acl2::x acl2::y) (pos-listp acl2::y)) (pos-listp acl2::x)) (implies (and (pos-listp acl2::y) (subsetp-equal acl2::x acl2::y)) (pos-listp acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-set-equiv-congruence (implies (set-equiv acl2::x acl2::y) (equal (pos-listp acl2::x) (pos-listp acl2::y))) :rule-classes :congruence)
Theorem:
(defthm pos-listp-of-set-difference-equal (implies (pos-listp acl2::x) (pos-listp (set-difference-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-intersection-equal-1 (implies (pos-listp (double-rewrite acl2::x)) (pos-listp (intersection-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-intersection-equal-2 (implies (pos-listp (double-rewrite acl2::y)) (pos-listp (intersection-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-union-equal (equal (pos-listp (union-equal acl2::x acl2::y)) (and (pos-listp (list-fix acl2::x)) (pos-listp (double-rewrite acl2::y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-take (implies (pos-listp (double-rewrite acl2::x)) (iff (pos-listp (take acl2::n acl2::x)) (or (posp nil) (<= (nfix acl2::n) (len acl2::x))))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-repeat (iff (pos-listp (repeat acl2::n acl2::x)) (or (posp acl2::x) (zp acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm posp-of-nth-when-pos-listp (implies (pos-listp acl2::x) (iff (posp (nth acl2::n acl2::x)) (< (nfix acl2::n) (len acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-update-nth (implies (pos-listp (double-rewrite acl2::x)) (iff (pos-listp (update-nth acl2::n acl2::y acl2::x)) (and (posp acl2::y) (or (<= (nfix acl2::n) (len acl2::x)) (posp nil))))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-butlast (implies (pos-listp (double-rewrite acl2::x)) (pos-listp (butlast acl2::x acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-nthcdr (implies (pos-listp (double-rewrite acl2::x)) (pos-listp (nthcdr acl2::n acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-last (implies (pos-listp (double-rewrite acl2::x)) (pos-listp (last acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-remove (implies (pos-listp acl2::x) (pos-listp (remove acl2::a acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm pos-listp-of-revappend (equal (pos-listp (revappend acl2::x acl2::y)) (and (pos-listp (list-fix acl2::x)) (pos-listp acl2::y))) :rule-classes ((:rewrite)))