modernized primrec
authorhaftmann
Sat, 07 Nov 2009 08:17:52 +0100
changeset 33498 318acc1c9399
parent 33469 0183f9545fa2
child 33499 30e6e070bdb6
modernized primrec
src/HOL/Library/Permutation.thy
--- a/src/HOL/Library/Permutation.thy	Fri Nov 06 13:42:29 2009 +0100
+++ b/src/HOL/Library/Permutation.thy	Sat Nov 07 08:17:52 2009 +0100
@@ -93,11 +93,9 @@
 
 subsection {* Removing elements *}
 
-consts
-  remove :: "'a => 'a list => 'a list"
-primrec
-  "remove x [] = []"
-  "remove x (y # ys) = (if x = y then ys else y # remove x ys)"
+primrec remove :: "'a => 'a list => 'a list" where
+    "remove x [] = []"
+  | "remove x (y # ys) = (if x = y then ys else y # remove x ys)"
 
 lemma perm_remove: "x \<in> set ys ==> ys <~~> x # remove x ys"
   by (induct ys) auto
@@ -156,7 +154,7 @@
   done
 
 lemma multiset_of_le_perm_append:
-    "(multiset_of xs \<le># multiset_of ys) = (\<exists>zs. xs @ zs <~~> ys)";
+    "(multiset_of xs \<le># multiset_of ys) = (\<exists>zs. xs @ zs <~~> ys)"
   apply (auto simp: multiset_of_eq_perm[THEN sym] mset_le_exists_conv)
   apply (insert surj_multiset_of, drule surjD)
   apply (blast intro: sym)+