src/HOL/List.thy
changeset 67973 9ecc78bcf1ef
parent 67949 4bb49ed64933
child 68028 1f9f973eed2a
equal deleted inserted replaced
67972:959b0aed2ce5 67973:9ecc78bcf1ef
  4960 
  4960 
  4961 lemma sorted_wrt_mono:
  4961 lemma sorted_wrt_mono:
  4962   "(\<And>x y. P x y \<Longrightarrow> Q x y) \<Longrightarrow> sorted_wrt P xs \<Longrightarrow> sorted_wrt Q xs"
  4962   "(\<And>x y. P x y \<Longrightarrow> Q x y) \<Longrightarrow> sorted_wrt P xs \<Longrightarrow> sorted_wrt Q xs"
  4963 by(induction xs rule: induct_list012)(auto)
  4963 by(induction xs rule: induct_list012)(auto)
  4964 
  4964 
       
  4965 lemma sorted_wrt01: "length xs \<le> 1 \<Longrightarrow> sorted_wrt P xs"
       
  4966 by(auto simp: le_Suc_eq length_Suc_conv)
       
  4967 
  4965 text \<open>Strictly Ascending Sequences of Natural Numbers\<close>
  4968 text \<open>Strictly Ascending Sequences of Natural Numbers\<close>
  4966 
  4969 
  4967 lemma sorted_wrt_upt[simp]: "sorted_wrt (<) [0..<n]"
  4970 lemma sorted_wrt_upt[simp]: "sorted_wrt (<) [0..<n]"
  4968 by(induction n) (auto simp: sorted_wrt_append)
  4971 by(induction n) (auto simp: sorted_wrt_append)
  4969 
  4972