other
(in-package "DEFDATA")
other
(include-book "num-list-fns")
other
(defthm pos-list--first (implies (and (pos-listp l) (consp l)) (< 0 (car l))) :rule-classes (:linear :rewrite))
other
(defthm sum-list-poses-type (implies (and (pos-listp l) (consp l)) (< 0 (sum-list l))) :rule-classes (:linear :rewrite))
other
(defthm sum-list-nats-type (implies (nat-listp l) (<= 0 (sum-list l))) :rule-classes (:linear :rewrite))
other
(defthm sum-list-integers-type (implies (integer-listp l) (integerp (sum-list l))) :rule-classes (:rewrite :type-prescription))
other
(defthm sum-list-rationals-type (implies (rational-listp l) (rationalp (sum-list l))) :rule-classes (:rewrite :type-prescription))
other
(defthm sum-list>=element (implies (and (nat-listp l) (consp l)) (>= (sum-list l) (car l))) :rule-classes (:rewrite :linear))
other
(encapsulate nil (local (include-book "arithmetic-5/top" :dir :system)) (local (set-default-hints '((nonlinearp-default-hint stable-under-simplificationp hist pspv)))) (defthm product-list-poses-type (implies (pos-listp l) (< 0 (product-list l))) :rule-classes (:linear :rewrite)) (defthm product-list-nats-type (implies (nat-listp l) (<= 0 (product-list l))) :rule-classes (:linear :rewrite)) (defthm product-list-integers-type (implies (integer-listp l) (integerp (product-list l))) :rule-classes (:rewrite :type-prescription)) (defthm product-list-rationals-type (implies (rational-listp l) (rationalp (product-list l))) :rule-classes (:rewrite :type-prescription)) (defthm product-list>=element (implies (and (pos-listp l) (consp l)) (>= (product-list l) (car l))) :rule-classes (:rewrite :linear)) (defthm product-list--append (equal (product-list (append x y)) (* (product-list x) (product-list y)))))
other
(defthm max-nat-list<=sum-list (implies (nat-listp l) (<= (max-nat-list l) (sum-list l))) :rule-classes (:linear :rewrite))
other
(defthm max-nat-list>=element (implies (and (nat-listp l) (consp l)) (>= (max-nat-list l) (car l))) :rule-classes (:linear :rewrite))
other
(defthm max-nat-list--nat-listp (implies (nat-listp l) (integerp (max-nat-list l))) :rule-classes (:type-prescription :rewrite))
other
(defthm max-nat-list--nat-listp2 (implies (nat-listp l) (<= 0 (max-nat-list l))) :rule-classes (:linear :rewrite))
other
(defthm scale--pos-list (implies (and (pos-listp l) (integerp x) (< 0 x)) (pos-listp (scale l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm scale--nat-list (implies (and (nat-listp l) (integerp x) (<= 0 x)) (nat-listp (scale l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm scale--integer-list (implies (and (integer-listp l) (integerp x)) (integer-listp (scale l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm scale--rational-list (implies (and (rational-listp l) (rationalp x)) (rational-listp (scale l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm scale--number-list (implies (and (acl2-number-listp l) (acl2-numberp x)) (acl2-number-listp (scale l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm scale--consp (implies (consp l) (consp (scale l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm shift--pos-list (implies (and (pos-listp l) (integerp x) (< 0 x)) (pos-listp (shift l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm shift--nat-list (implies (and (nat-listp l) (integerp x) (<= 0 x)) (nat-listp (shift l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm shift--integer-list (implies (and (integer-listp l) (integerp x)) (integer-listp (shift l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm shift--rational-list (implies (and (rational-listp l) (rationalp x)) (rational-listp (shift l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm shift--number-list (implies (and (acl2-number-listp l) (acl2-numberp x)) (acl2-number-listp (shift l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm shift--consp (implies (consp l) (consp (shift l x))) :rule-classes (:type-prescription :rewrite))
other
(defthm list-expt--number-list (implies (and (acl2-number-listp l) (integerp x) (<= 0 x)) (acl2-number-listp (list-expt x l))) :rule-classes (:type-prescription :rewrite))
other
(defthm list-expt--consp (implies (consp l) (consp (list-expt x l))) :rule-classes (:type-prescription :rewrite))
other
(defthm expt--integer (implies (and (integerp x) (integerp y) (<= 0 y)) (integerp (expt x y))))
other
(defthm expt-->=0 (implies (and (integerp x) (< 0 x) (integerp y) (<= 0 y)) (< 0 (expt x y))) :rule-classes (:rewrite :linear))
other
(defthm <=-lists--transitive (implies (and (<=-lists a b) (<=-lists b c)) (<=-lists a c)) :rule-classes ((:rewrite :match-free :all)))
other
(defthm <=-lists--reflexive (<=-lists x x))
other
(defthm all-<=--nth-<= (implies (and (all-<= l v) (integerp i) (<= 0 i) (< i (len l))) (<= (nth i l) v)))
other
(defthm <=-lists--all-<= (implies (and (all-<= b x) (<=-lists a b)) (all-<= a x)) :rule-classes (:rewrite :forward-chaining))
other
(defthm *-lists-poses-type (implies (and (pos-listp l1) (pos-listp l2)) (pos-listp (*-lists l1 l2))) :rule-classes (:type-prescription :rewrite))
other
(defthm *-lists-nats-type (implies (and (nat-listp l1) (nat-listp l2)) (nat-listp (*-lists l1 l2))) :rule-classes (:type-prescription :rewrite))
other
(defthm *-lists-integers-type (implies (and (integer-listp l1) (integer-listp l2)) (integer-listp (*-lists l1 l2))) :rule-classes (:type-prescription :rewrite))
other
(defthm *-lists-rationals-type (implies (and (rational-listp l1) (rational-listp l2)) (rational-listp (*-lists l1 l2))) :rule-classes (:type-prescription :rewrite))
other
(defthm +-lists-poses-type (implies (and (pos-listp l1) (pos-listp l2)) (pos-listp (+-lists l1 l2))) :rule-classes (:type-prescription :rewrite))
other
(defthm +-lists-nats-type (implies (and (nat-listp l1) (nat-listp l2)) (nat-listp (+-lists l1 l2))) :rule-classes (:type-prescription :rewrite))
other
(defthm +-lists-integers-type (implies (and (integer-listp l1) (integer-listp l2)) (integer-listp (+-lists l1 l2))) :rule-classes (:type-prescription :rewrite))
other
(defthm +-lists-rationals-type (implies (and (rational-listp l1) (rational-listp l2)) (rational-listp (+-lists l1 l2))) :rule-classes (:type-prescription :rewrite))
other
(defthm make-list-ac=make-list-logic--lemma (equal (append (make-list-logic e n) (cons e l)) (cons e (append (make-list-logic e n) l))))
other
(defthm make-list-ac=make-list-logic-append (equal (make-list-ac n e l) (append (make-list-logic e n) l)))
other
(defthm make-list-ac--to--make-list-logic (equal (make-list-ac n e nil) (make-list-logic e n)))
other
(defthm make-list--len (implies (and (integerp n) (<= 0 n)) (equal (len (make-list-logic v n)) n)))
other
(defthm make-list--consp (implies (and (integerp n) (< 0 n)) (consp (make-list-logic v n))) :rule-classes (:rewrite :type-prescription) :hints (("Subgoal *1/3'" :expand ((make-list-logic v 1)))))
other
(defthm make-list--nats (implies (and (integerp v) (<= 0 v)) (nat-listp (make-list-logic v n))) :rule-classes (:rewrite :type-prescription))
other
(defthm make-list--pos (implies (and (integerp v) (< 0 v)) (pos-listp (make-list-logic v n))) :rule-classes (:rewrite :type-prescription))
other
(defthm car--make-list (implies (and (integerp n) (< 0 n)) (equal (car (make-list-logic v n)) v)) :hints (("Subgoal *1/3'" :expand ((make-list-logic v 1)))))
other
(defthm cdr--make-list (implies (and (integerp n) (< 0 n)) (equal (cdr (make-list-logic v n)) (make-list-logic v (- n 1)))))
other
(defthm pfix--integerp (integerp (pfix x)) :rule-classes (:rewrite :type-prescription))
other
(in-theory (disable pfix))
other
(defthm pos-list-fix--pos-listp (pos-listp (pos-list-fix x)))
other
(defthm pos-list-fix--integer-listp (integer-listp (pos-list-fix x)))
other
(defthm pos-list-fix--rational-listp (rational-listp (pos-list-fix x)))
other
(defthm pos-list-fix--cdr (equal (cdr (pos-list-fix x)) (pos-list-fix (cdr x))))
other
(defthm pos-list-fix--consp (equal (consp (pos-list-fix x)) (consp x)))
other
(in-theory (disable pos-list-fix))