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