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