merged
authorwenzelm
Sat, 22 Oct 2022 20:15:36 +0200
changeset 76364 2c0f252fb11c
parent 76360 2b204e11141c (diff)
parent 76363 f7174238b5e3 (current diff)
child 76365 24e951a8a318
merged
--- a/src/HOL/Library/Multiset.thy	Sat Oct 22 20:06:55 2022 +0200
+++ b/src/HOL/Library/Multiset.thy	Sat Oct 22 20:15:36 2022 +0200
@@ -2002,13 +2002,12 @@
   by (induct xs) simp_all
 
 lemma surj_mset: "surj mset"
-apply (unfold surj_def)
-apply (rule allI)
-apply (rule_tac M = y in multiset_induct)
- apply auto
-apply (rule_tac x = "x # xa" in exI)
-apply auto
-done
+  unfolding surj_def
+proof (rule allI)
+  fix M
+  show "\<exists>xs. M = mset xs"
+    by (induction M) (auto intro: exI[of _ "_ # _"])
+qed
 
 lemma distinct_count_atmost_1:
   "distinct x = (\<forall>a. count (mset x) a = (if a \<in> set x then 1 else 0))"