src/HOL/List.thy
changeset 63901 4ce989e962e0
parent 63834 6a757f36997e
child 64267 b9a1486e79be
equal deleted inserted replaced
63899:dc036b1a2a6f 63901:4ce989e962e0
  4911   with \<open>inj_on f (set xs \<union> set ys)\<close> show "xs = ys"
  4911   with \<open>inj_on f (set xs \<union> set ys)\<close> show "xs = ys"
  4912     by (blast intro: map_inj_on)
  4912     by (blast intro: map_inj_on)
  4913 qed
  4913 qed
  4914 
  4914 
  4915 lemma finite_sorted_distinct_unique:
  4915 lemma finite_sorted_distinct_unique:
  4916 shows "finite A \<Longrightarrow> EX! xs. set xs = A & sorted xs & distinct xs"
  4916 shows "finite A \<Longrightarrow> \<exists>!xs. set xs = A \<and> sorted xs \<and> distinct xs"
  4917 apply(drule finite_distinct_list)
  4917 apply(drule finite_distinct_list)
  4918 apply clarify
  4918 apply clarify
  4919 apply(rule_tac a="sort xs" in ex1I)
  4919 apply(rule_tac a="sort xs" in ex1I)
  4920 apply (auto simp: sorted_distinct_set_unique)
  4920 apply (auto simp: sorted_distinct_set_unique)
  4921 done
  4921 done