src/HOL/Library/Multiset.thy
changeset 37074 322d065ebef7
parent 36903 489c1fbbb028
child 37107 1535aa1c943a
equal deleted inserted replaced
37055:8f9f3d61ca8c 37074:322d065ebef7
   824 
   824 
   825 text {*
   825 text {*
   826   This lemma shows which properties suffice to show that a function
   826   This lemma shows which properties suffice to show that a function
   827   @{text "f"} with @{text "f xs = ys"} behaves like sort.
   827   @{text "f"} with @{text "f xs = ys"} behaves like sort.
   828 *}
   828 *}
   829 lemma properties_for_sort:
   829 
       
   830 lemma (in linorder) properties_for_sort:
   830   "multiset_of ys = multiset_of xs \<Longrightarrow> sorted ys \<Longrightarrow> sort xs = ys"
   831   "multiset_of ys = multiset_of xs \<Longrightarrow> sorted ys \<Longrightarrow> sort xs = ys"
   831 proof (induct xs arbitrary: ys)
   832 proof (induct xs arbitrary: ys)
   832   case Nil then show ?case by simp
   833   case Nil then show ?case by simp
   833 next
   834 next
   834   case (Cons x xs)
   835   case (Cons x xs)