Basic theorems about vl-maybe-nat-listp, generated by deflist.

**Theorem: **

(defthm vl-maybe-nat-listp-of-cons (equal (vl-maybe-nat-listp (cons acl2::a acl2::x)) (and (maybe-natp acl2::a) (vl-maybe-nat-listp acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-cdr-when-vl-maybe-nat-listp (implies (vl-maybe-nat-listp (double-rewrite acl2::x)) (vl-maybe-nat-listp (cdr acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-when-not-consp (implies (not (consp acl2::x)) (vl-maybe-nat-listp acl2::x)) :rule-classes ((:rewrite)))

**Theorem: **

(defthm maybe-natp-of-car-when-vl-maybe-nat-listp (implies (vl-maybe-nat-listp acl2::x) (maybe-natp (car acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-append (equal (vl-maybe-nat-listp (append acl2::a acl2::b)) (and (vl-maybe-nat-listp acl2::a) (vl-maybe-nat-listp acl2::b))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-list-fix (equal (vl-maybe-nat-listp (list-fix acl2::x)) (vl-maybe-nat-listp acl2::x)) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-sfix (iff (vl-maybe-nat-listp (sfix acl2::x)) (or (vl-maybe-nat-listp acl2::x) (not (setp acl2::x)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-insert (iff (vl-maybe-nat-listp (insert acl2::a acl2::x)) (and (vl-maybe-nat-listp (sfix acl2::x)) (maybe-natp acl2::a))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-delete (implies (vl-maybe-nat-listp acl2::x) (vl-maybe-nat-listp (delete acl2::k acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-mergesort (iff (vl-maybe-nat-listp (mergesort acl2::x)) (vl-maybe-nat-listp (list-fix acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-union (iff (vl-maybe-nat-listp (union acl2::x acl2::y)) (and (vl-maybe-nat-listp (sfix acl2::x)) (vl-maybe-nat-listp (sfix acl2::y)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-intersect-1 (implies (vl-maybe-nat-listp acl2::x) (vl-maybe-nat-listp (intersect acl2::x acl2::y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-intersect-2 (implies (vl-maybe-nat-listp acl2::y) (vl-maybe-nat-listp (intersect acl2::x acl2::y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-difference (implies (vl-maybe-nat-listp acl2::x) (vl-maybe-nat-listp (difference acl2::x acl2::y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-duplicated-members (implies (vl-maybe-nat-listp acl2::x) (vl-maybe-nat-listp (duplicated-members acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-rev (equal (vl-maybe-nat-listp (rev acl2::x)) (vl-maybe-nat-listp (list-fix acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-rcons (iff (vl-maybe-nat-listp (acl2::rcons acl2::a acl2::x)) (and (maybe-natp acl2::a) (vl-maybe-nat-listp (list-fix acl2::x)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm maybe-natp-when-member-equal-of-vl-maybe-nat-listp (and (implies (and (member-equal acl2::a acl2::x) (vl-maybe-nat-listp acl2::x)) (maybe-natp acl2::a)) (implies (and (vl-maybe-nat-listp acl2::x) (member-equal acl2::a acl2::x)) (maybe-natp acl2::a))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-when-subsetp-equal (and (implies (and (subsetp-equal acl2::x acl2::y) (vl-maybe-nat-listp acl2::y)) (vl-maybe-nat-listp acl2::x)) (implies (and (vl-maybe-nat-listp acl2::y) (subsetp-equal acl2::x acl2::y)) (vl-maybe-nat-listp acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-set-equiv-congruence (implies (set-equiv acl2::x acl2::y) (equal (vl-maybe-nat-listp acl2::x) (vl-maybe-nat-listp acl2::y))) :rule-classes :congruence)

**Theorem: **

(defthm vl-maybe-nat-listp-of-set-difference-equal (implies (vl-maybe-nat-listp acl2::x) (vl-maybe-nat-listp (set-difference-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-intersection-equal-1 (implies (vl-maybe-nat-listp (double-rewrite acl2::x)) (vl-maybe-nat-listp (intersection-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-intersection-equal-2 (implies (vl-maybe-nat-listp (double-rewrite acl2::y)) (vl-maybe-nat-listp (intersection-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-union-equal (equal (vl-maybe-nat-listp (union-equal acl2::x acl2::y)) (and (vl-maybe-nat-listp (list-fix acl2::x)) (vl-maybe-nat-listp (double-rewrite acl2::y)))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-take (implies (vl-maybe-nat-listp (double-rewrite acl2::x)) (iff (vl-maybe-nat-listp (take acl2::n acl2::x)) (or (maybe-natp nil) (<= (nfix acl2::n) (len acl2::x))))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-repeat (iff (vl-maybe-nat-listp (repeat acl2::n acl2::x)) (or (maybe-natp acl2::x) (zp acl2::n))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm maybe-natp-of-nth-when-vl-maybe-nat-listp (implies (vl-maybe-nat-listp acl2::x) (maybe-natp (nth acl2::n acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-update-nth (implies (vl-maybe-nat-listp (double-rewrite acl2::x)) (iff (vl-maybe-nat-listp (update-nth acl2::n acl2::y acl2::x)) (and (maybe-natp acl2::y) (or (<= (nfix acl2::n) (len acl2::x)) (maybe-natp nil))))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-butlast (implies (vl-maybe-nat-listp (double-rewrite acl2::x)) (vl-maybe-nat-listp (butlast acl2::x acl2::n))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-nthcdr (implies (vl-maybe-nat-listp (double-rewrite acl2::x)) (vl-maybe-nat-listp (nthcdr acl2::n acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-last (implies (vl-maybe-nat-listp (double-rewrite acl2::x)) (vl-maybe-nat-listp (last acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-remove (implies (vl-maybe-nat-listp acl2::x) (vl-maybe-nat-listp (remove acl2::a acl2::x))) :rule-classes ((:rewrite)))

**Theorem: **

(defthm vl-maybe-nat-listp-of-revappend (equal (vl-maybe-nat-listp (revappend acl2::x acl2::y)) (and (vl-maybe-nat-listp (list-fix acl2::x)) (vl-maybe-nat-listp acl2::y))) :rule-classes ((:rewrite)))