Basic theorems about alternationp, generated by std::deflist.
Theorem:
(defthm alternationp-of-cons (equal (alternationp (cons acl2::a acl2::x)) (and (concatenationp acl2::a) (alternationp acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-cdr-when-alternationp (implies (alternationp (double-rewrite acl2::x)) (alternationp (cdr acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-when-not-consp (implies (not (consp acl2::x)) (equal (alternationp acl2::x) (not acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm concatenationp-of-car-when-alternationp (implies (alternationp acl2::x) (concatenationp (car acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-when-alternationp-compound-recognizer (implies (alternationp acl2::x) (true-listp acl2::x)) :rule-classes :compound-recognizer)
Theorem:
(defthm alternationp-of-list-fix (implies (alternationp acl2::x) (alternationp (list-fix acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-rev (equal (alternationp (rev acl2::x)) (alternationp (list-fix acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-append (equal (alternationp (append acl2::a acl2::b)) (and (alternationp (list-fix acl2::a)) (alternationp acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-last (implies (alternationp (double-rewrite acl2::x)) (alternationp (last acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm concatenationp-of-nth-when-alternationp (implies (alternationp acl2::x) (concatenationp (nth acl2::n acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-nthcdr (implies (alternationp (double-rewrite acl2::x)) (alternationp (nthcdr acl2::n acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-remove (implies (alternationp acl2::x) (alternationp (remove acl2::a acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-repeat (iff (alternationp (repeat acl2::n acl2::x)) (or (concatenationp acl2::x) (zp acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-revappend (equal (alternationp (revappend acl2::x acl2::y)) (and (alternationp (list-fix acl2::x)) (alternationp acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-rcons (iff (alternationp (rcons acl2::a acl2::x)) (and (concatenationp acl2::a) (alternationp (list-fix acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm concatenationp-when-member-equal-of-alternationp (and (implies (and (member-equal acl2::a acl2::x) (alternationp acl2::x)) (concatenationp acl2::a)) (implies (and (alternationp acl2::x) (member-equal acl2::a acl2::x)) (concatenationp acl2::a))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-when-subsetp-equal (and (implies (and (subsetp-equal acl2::x acl2::y) (alternationp acl2::y)) (equal (alternationp acl2::x) (true-listp acl2::x))) (implies (and (alternationp acl2::y) (subsetp-equal acl2::x acl2::y)) (equal (alternationp acl2::x) (true-listp acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-set-difference-equal (implies (alternationp acl2::x) (alternationp (set-difference-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-intersection-equal-1 (implies (alternationp (double-rewrite acl2::x)) (alternationp (intersection-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-intersection-equal-2 (implies (alternationp (double-rewrite acl2::y)) (alternationp (intersection-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-union-equal (equal (alternationp (union-equal acl2::x acl2::y)) (and (alternationp (list-fix acl2::x)) (alternationp (double-rewrite acl2::y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-take (implies (alternationp (double-rewrite acl2::x)) (iff (alternationp (take acl2::n acl2::x)) (or (concatenationp nil) (<= (nfix acl2::n) (len acl2::x))))) :rule-classes ((:rewrite)))
Theorem:
(defthm alternationp-of-update-nth (implies (alternationp (double-rewrite acl2::x)) (iff (alternationp (update-nth acl2::n acl2::y acl2::x)) (and (concatenationp acl2::y) (or (<= (nfix acl2::n) (len acl2::x)) (concatenationp nil))))) :rule-classes ((:rewrite)))