author nipkow Mon, 14 May 2018 20:27:39 +0200 changeset 68186 56fcf7e980e3 parent 68176 3e4af46a6f6a child 68187 48262e3a2bde
cleaning up sorted
 src/HOL/List.thy file | annotate | diff | comparison | revisions
--- a/src/HOL/List.thy	Mon May 14 18:19:35 2018 +0200
+++ b/src/HOL/List.thy	Mon May 14 20:27:39 2018 +0200
@@ -4932,7 +4932,7 @@

subsubsection \<open>@{const sorted_wrt}\<close>

-text \<open>Sometimes the second equation in the definition of @{const sorted_wrt} is to aggressive
+text \<open>Sometimes the second equation in the definition of @{const sorted_wrt} is too aggressive
because it relates each list element to \emph{all} its successors. Then this equation

@@ -5013,7 +5013,7 @@
context linorder
begin

-text \<open>Sometimes the second equation in the definition of @{const sorted} is to aggressive
+text \<open>Sometimes the second equation in the definition of @{const sorted} is too aggressive
because it relates each list element to \emph{all} its successors. Then this equation
Executable code is one such use case.\<close>
@@ -5043,13 +5043,17 @@
"sorted xs \<Longrightarrow> sorted (tl xs)"
by (cases xs) (simp_all)

-lemma sorted_iff_nth_mono:
+lemma sorted_iff_nth_mono_less:
"sorted xs = (\<forall>i j. i < j \<longrightarrow> j < length xs \<longrightarrow> xs ! i \<le> xs ! j)"
"sorted (rev xs) \<Longrightarrow> i \<le> j \<Longrightarrow> j < length xs \<Longrightarrow> xs!j \<le> xs!i"