Basic theorems about rlp-tree-listp, generated by std::deflist.

**Theorem: **

(defthm rlp-tree-listp-of-cons (equal (rlp-tree-listp (cons acl2::a acl2::x)) (and (rlp-treep acl2::a) (rlp-tree-listp acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-cdr-when-rlp-tree-listp (implies (rlp-tree-listp (double-rewrite acl2::x)) (rlp-tree-listp (cdr acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-when-not-consp (implies (not (consp acl2::x)) (equal (rlp-tree-listp acl2::x) (not acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-treep-of-car-when-rlp-tree-listp (implies (rlp-tree-listp acl2::x) (iff (rlp-treep (car acl2::x)) (consp acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm true-listp-when-rlp-tree-listp-compound-recognizer (implies (rlp-tree-listp acl2::x) (true-listp acl2::x)) :rule-classes :compound-recognizer)

**Theorem: **

(defthm rlp-tree-listp-of-list-fix (implies (rlp-tree-listp acl2::x) (rlp-tree-listp (list-fix acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-sfix (iff (rlp-tree-listp (sfix acl2::x)) (or (rlp-tree-listp acl2::x) (not (setp acl2::x)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-insert (iff (rlp-tree-listp (insert acl2::a acl2::x)) (and (rlp-tree-listp (sfix acl2::x)) (rlp-treep acl2::a))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-delete (implies (rlp-tree-listp acl2::x) (rlp-tree-listp (delete acl2::k acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-mergesort (iff (rlp-tree-listp (mergesort acl2::x)) (rlp-tree-listp (list-fix acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-union (iff (rlp-tree-listp (union acl2::x acl2::y)) (and (rlp-tree-listp (sfix acl2::x)) (rlp-tree-listp (sfix acl2::y)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-intersect-1 (implies (rlp-tree-listp acl2::x) (rlp-tree-listp (intersect acl2::x acl2::y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-intersect-2 (implies (rlp-tree-listp acl2::y) (rlp-tree-listp (intersect acl2::x acl2::y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-difference (implies (rlp-tree-listp acl2::x) (rlp-tree-listp (difference acl2::x acl2::y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-duplicated-members (implies (rlp-tree-listp acl2::x) (rlp-tree-listp (duplicated-members acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-rev (equal (rlp-tree-listp (rev acl2::x)) (rlp-tree-listp (list-fix acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

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

**Theorem: **

(defthm rlp-tree-listp-of-rcons (iff (rlp-tree-listp (rcons acl2::a acl2::x)) (and (rlp-treep acl2::a) (rlp-tree-listp (list-fix acl2::x)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-treep-when-member-equal-of-rlp-tree-listp (and (implies (and (member-equal acl2::a acl2::x) (rlp-tree-listp acl2::x)) (rlp-treep acl2::a)) (implies (and (rlp-tree-listp acl2::x) (member-equal acl2::a acl2::x)) (rlp-treep acl2::a))) :rule-classes ((:rewrite)))

**Theorem: **

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

**Theorem: **

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

**Theorem: **

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

**Theorem: **

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

**Theorem: **

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

**Theorem: **

(defthm rlp-tree-listp-of-take (implies (rlp-tree-listp (double-rewrite acl2::x)) (iff (rlp-tree-listp (take acl2::n acl2::x)) (or (rlp-treep nil) (<= (nfix acl2::n) (len acl2::x))))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-repeat (iff (rlp-tree-listp (repeat acl2::n acl2::x)) (or (rlp-treep acl2::x) (zp acl2::n))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-treep-of-nth-when-rlp-tree-listp (implies (rlp-tree-listp acl2::x) (iff (rlp-treep (nth acl2::n acl2::x)) (< (nfix acl2::n) (len acl2::x)))) :rule-classes ((:rewrite)))

**Theorem: **

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

**Theorem: **

(defthm rlp-tree-listp-of-butlast (implies (rlp-tree-listp (double-rewrite acl2::x)) (rlp-tree-listp (butlast acl2::x acl2::n))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-nthcdr (implies (rlp-tree-listp (double-rewrite acl2::x)) (rlp-tree-listp (nthcdr acl2::n acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-last (implies (rlp-tree-listp (double-rewrite acl2::x)) (rlp-tree-listp (last acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm rlp-tree-listp-of-remove (implies (rlp-tree-listp acl2::x) (rlp-tree-listp (remove acl2::a acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

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