new lemma
authornipkow
Tue, 19 May 2009 13:52:12 +0200
changeset 31201 3dde56615750
parent 31200 5b7b9ba5868d
child 31215 052fddd64006
child 31219 034f23104635
child 31226 1dffa9a056b5
child 32411 63975b7f79b1
new lemma
src/HOL/List.thy
--- a/src/HOL/List.thy	Mon May 18 23:43:36 2009 +0100
+++ b/src/HOL/List.thy	Tue May 19 13:52:12 2009 +0200
@@ -2913,6 +2913,10 @@
   "sorted (xs@ys) = (sorted xs & sorted ys & (\<forall>x \<in> set xs. \<forall>y \<in> set ys. x\<le>y))"
 by (induct xs) (auto simp add:sorted_Cons)
 
+lemma sorted_nth_mono:
+  "sorted xs \<Longrightarrow> i <= j \<Longrightarrow> j < length xs \<Longrightarrow> xs!i <= xs!j"
+by (induct xs arbitrary: i j) (auto simp:nth_Cons' sorted_Cons)
+
 lemma set_insort: "set(insort x xs) = insert x (set xs)"
 by (induct xs) auto