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