src/HOL/List.thy
changeset 68085 7fe53815cce9
parent 68083 d730a8cfc6e0
child 68109 cebf36c14226
equal deleted inserted replaced
68084:152cc388cd1e 68085:7fe53815cce9
  5623   case True thus ?thesis by(induction A) (simp_all add: distinct_insort)
  5623   case True thus ?thesis by(induction A) (simp_all add: distinct_insort)
  5624 next
  5624 next
  5625   case False thus ?thesis by simp
  5625   case False thus ?thesis by simp
  5626 qed
  5626 qed
  5627 
  5627 
       
  5628 lemmas sorted_list_of_set = set_sorted_list_of_set sorted_sorted_list_of_set distinct_sorted_list_of_set
       
  5629 
  5628 lemma sorted_list_of_set_sort_remdups [code]:
  5630 lemma sorted_list_of_set_sort_remdups [code]:
  5629   "sorted_list_of_set (set xs) = sort (remdups xs)"
  5631   "sorted_list_of_set (set xs) = sort (remdups xs)"
  5630 proof -
  5632 proof -
  5631   interpret comp_fun_commute insort by (fact comp_fun_commute_insort)
  5633   interpret comp_fun_commute insort by (fact comp_fun_commute_insort)
  5632   show ?thesis by (simp add: sorted_list_of_set.eq_fold sort_conv_fold fold_set_fold_remdups)
  5634   show ?thesis by (simp add: sorted_list_of_set.eq_fold sort_conv_fold fold_set_fold_remdups)
  6054   apply (rule allI, case_tac x, simp, simp)
  6056   apply (rule allI, case_tac x, simp, simp)
  6055   by blast
  6057   by blast
  6056 
  6058 
  6057 lemma lexord_irrefl:
  6059 lemma lexord_irrefl:
  6058   "irrefl R \<Longrightarrow> irrefl (lexord R)"
  6060   "irrefl R \<Longrightarrow> irrefl (lexord R)"
  6059   by (simp add: irrefl_def lexord_irreflexive)
  6061 by (simp add: irrefl_def lexord_irreflexive)
  6060 
  6062 
  6061 lemma lexord_asym:
  6063 lemma lexord_asym:
  6062   assumes "asym R"
  6064   assumes "asym R"
  6063   shows "asym (lexord R)"
  6065   shows "asym (lexord R)"
  6064 proof
  6066 proof