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