diff -r 46f59511b7bb -r d97fdabd9e2b src/HOL/Library/Multiset.thy --- a/src/HOL/Library/Multiset.thy Fri Sep 20 19:07:10 2024 +0200 +++ b/src/HOL/Library/Multiset.thy Fri Sep 20 19:51:08 2024 +0200 @@ -93,9 +93,9 @@ nonterminal multiset_args syntax - "" :: "'a \ multiset_args" ("_") - "_multiset_args" :: "'a \ multiset_args \ multiset_args" ("_,/ _") - "_multiset" :: "multiset_args \ 'a multiset" ("{#(_)#}") + "" :: "'a \ multiset_args" (\_\) + "_multiset_args" :: "'a \ multiset_args \ multiset_args" (\_,/ _\) + "_multiset" :: "multiset_args \ 'a multiset" (\{#(_)#}\) syntax_consts "_multiset_args" "_multiset" == add_mset translations @@ -167,12 +167,12 @@ end syntax - "_MBall" :: "pttrn \ 'a set \ bool \ bool" ("(3\_\#_./ _)" [0, 0, 10] 10) - "_MBex" :: "pttrn \ 'a set \ bool \ bool" ("(3\_\#_./ _)" [0, 0, 10] 10) + "_MBall" :: "pttrn \ 'a set \ bool \ bool" (\(3\_\#_./ _)\ [0, 0, 10] 10) + "_MBex" :: "pttrn \ 'a set \ bool \ bool" (\(3\_\#_./ _)\ [0, 0, 10] 10) syntax (ASCII) - "_MBall" :: "pttrn \ 'a set \ bool \ bool" ("(3\_:#_./ _)" [0, 0, 10] 10) - "_MBex" :: "pttrn \ 'a set \ bool \ bool" ("(3\_:#_./ _)" [0, 0, 10] 10) + "_MBall" :: "pttrn \ 'a set \ bool \ bool" (\(3\_:#_./ _)\ [0, 0, 10] 10) + "_MBex" :: "pttrn \ 'a set \ bool \ bool" (\(3\_:#_./ _)\ [0, 0, 10] 10) syntax_consts "_MBall" \ Multiset.Ball and @@ -526,27 +526,27 @@ subsubsection \Pointwise ordering induced by count\ -definition subseteq_mset :: "'a multiset \ 'a multiset \ bool" (infix "\#" 50) +definition subseteq_mset :: "'a multiset \ 'a multiset \ bool" (infix \\#\ 50) where "A \# B \ (\a. count A a \ count B a)" -definition subset_mset :: "'a multiset \ 'a multiset \ bool" (infix "\#" 50) +definition subset_mset :: "'a multiset \ 'a multiset \ bool" (infix \\#\ 50) where "A \# B \ A \# B \ A \ B" -abbreviation (input) supseteq_mset :: "'a multiset \ 'a multiset \ bool" (infix "\#" 50) +abbreviation (input) supseteq_mset :: "'a multiset \ 'a multiset \ bool" (infix \\#\ 50) where "supseteq_mset A B \ B \# A" -abbreviation (input) supset_mset :: "'a multiset \ 'a multiset \ bool" (infix "\#" 50) +abbreviation (input) supset_mset :: "'a multiset \ 'a multiset \ bool" (infix \\#\ 50) where "supset_mset A B \ B \# A" notation (input) - subseteq_mset (infix "\#" 50) and - supseteq_mset (infix "\#" 50) + subseteq_mset (infix \\#\ 50) and + supseteq_mset (infix \\#\ 50) notation (ASCII) - subseteq_mset (infix "<=#" 50) and - subset_mset (infix "<#" 50) and - supseteq_mset (infix ">=#" 50) and - supset_mset (infix ">#" 50) + subseteq_mset (infix \<=#\ 50) and + subset_mset (infix \<#\ 50) and + supseteq_mset (infix \>=#\ 50) and + supset_mset (infix \>#\ 50) global_interpretation subset_mset: ordering \(\#)\ \(\#)\ by standard (auto simp add: subset_mset_def subseteq_mset_def multiset_eq_iff intro: order.trans order.antisym) @@ -1254,9 +1254,9 @@ by (rule filter_preserves_multiset) syntax (ASCII) - "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" ("(1{#_ :# _./ _#})") + "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" (\(1{#_ :# _./ _#})\) syntax - "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" ("(1{#_ \# _./ _#})") + "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" (\(1{#_ \# _./ _#})\) syntax_consts "_MCollect" == filter_mset translations @@ -1829,18 +1829,18 @@ image_mset_subseteq_mono subset_mset.less_le_not_le) syntax (ASCII) - "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" ("({#_/. _ :# _#})") + "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" (\({#_/. _ :# _#})\) syntax - "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" ("({#_/. _ \# _#})") + "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" (\({#_/. _ \# _#})\) syntax_consts "_comprehension_mset" \ image_mset translations "{#e. x \# M#}" \ "CONST image_mset (\x. e) M" syntax (ASCII) - "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" ("({#_/ | _ :# _./ _#})") + "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" (\({#_/ | _ :# _./ _#})\) syntax - "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" ("({#_/ | _ \# _./ _#})") + "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" (\({#_/ | _ \# _./ _#})\) syntax_consts "_comprehension_mset'" \ image_mset translations @@ -2684,12 +2684,12 @@ end -notation sum_mset ("\\<^sub>#") +notation sum_mset (\\\<^sub>#\) syntax (ASCII) - "_sum_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_add" ("(3SUM _:#_. _)" [0, 51, 10] 10) + "_sum_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_add" (\(3SUM _:#_. _)\ [0, 51, 10] 10) syntax - "_sum_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_add" ("(3\_\#_. _)" [0, 51, 10] 10) + "_sum_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_add" (\(3\_\#_. _)\ [0, 51, 10] 10) syntax_consts "_sum_mset_image" \ sum_mset translations @@ -2865,12 +2865,12 @@ end -notation prod_mset ("\\<^sub>#") +notation prod_mset (\\\<^sub>#\) syntax (ASCII) - "_prod_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_mult" ("(3PROD _:#_. _)" [0, 51, 10] 10) + "_prod_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_mult" (\(3PROD _:#_. _)\ [0, 51, 10] 10) syntax - "_prod_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_mult" ("(3\_\#_. _)" [0, 51, 10] 10) + "_prod_mset_image" :: "pttrn \ 'b set \ 'a \ 'a::comm_monoid_mult" (\(3\_\#_. _)\ [0, 51, 10] 10) syntax_consts "_prod_mset_image" \ prod_mset translations