diff -r 3e3e7a68cd80 -r 6ad2c917dd2e src/HOL/Library/Multiset.thy --- a/src/HOL/Library/Multiset.thy Wed Oct 09 22:01:33 2024 +0200 +++ b/src/HOL/Library/Multiset.thy Wed Oct 09 23:38:29 2024 +0200 @@ -133,22 +133,22 @@ notation member_mset (\'(\#')\) and - member_mset (\(_/ \# _)\ [50, 51] 50) + member_mset (\(\notation=\infix \#\\_/ \# _)\ [50, 51] 50) notation (ASCII) member_mset (\'(:#')\) and - member_mset (\(_/ :# _)\ [50, 51] 50) + member_mset (\(\notation=\infix :#\\_/ :# _)\ [50, 51] 50) abbreviation not_member_mset :: \'a \ 'a multiset \ bool\ where \not_member_mset a M \ a \ set_mset M\ notation not_member_mset (\'(\#')\) and - not_member_mset (\(_/ \# _)\ [50, 51] 50) + not_member_mset (\(\notation=\infix \#\\_/ \# _)\ [50, 51] 50) notation (ASCII) not_member_mset (\'(~:#')\) and - not_member_mset (\(_/ ~:# _)\ [50, 51] 50) + not_member_mset (\(\notation=\infix ~:#\\_/ ~:# _)\ [50, 51] 50) context begin @@ -162,17 +162,18 @@ 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" + (\(\indent=3 notation=\binder \\\\_\#_./ _)\ [0, 0, 10] 10) + "_MBex" :: "pttrn \ 'a set \ bool \ bool" + (\(\indent=3 notation=\binder \\\\_\#_./ _)\ [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" + (\(\indent=3 notation=\binder \\\\_:#_./ _)\ [0, 0, 10] 10) + "_MBex" :: "pttrn \ 'a set \ bool \ bool" + (\(\indent=3 notation=\binder \\\\_:#_./ _)\ [0, 0, 10] 10) syntax_consts "_MBall" \ Multiset.Ball and "_MBex" \ Multiset.Bex - translations "\x\#A. P" \ "CONST Multiset.Ball A (\x. P)" "\x\#A. P" \ "CONST Multiset.Bex A (\x. P)" @@ -1249,9 +1250,11 @@ by (rule filter_preserves_multiset) syntax (ASCII) - "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" (\(1{#_ :# _./ _#})\) + "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" + (\(\indent=1 notation=\mixfix multiset comprehension\\{#_ :# _./ _#})\) syntax - "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" (\(1{#_ \# _./ _#})\) + "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" + (\(\indent=1 notation=\mixfix multiset comprehension\\{#_ \# _./ _#})\) syntax_consts "_MCollect" == filter_mset translations @@ -1824,18 +1827,22 @@ 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" + (\(\notation=\mixfix multiset comprehension\\{#_/. _ :# _#})\) syntax - "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" (\({#_/. _ \# _#})\) + "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" + (\(\notation=\mixfix multiset comprehension\\{#_/. _ \# _#})\) 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" + (\(\notation=\mixfix multiset comprehension\\{#_/ | _ :# _./ _#})\) syntax - "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" (\({#_/ | _ \# _./ _#})\) + "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" + (\(\notation=\mixfix multiset comprehension\\{#_/ | _ \# _./ _#})\) syntax_consts "_comprehension_mset'" \ image_mset translations @@ -2682,9 +2689,11 @@ 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" + (\(\indent=3 notation=\binder SUM\\SUM _:#_. _)\ [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" + (\(\indent=3 notation=\binder \\\\_\#_. _)\ [0, 51, 10] 10) syntax_consts "_sum_mset_image" \ sum_mset translations @@ -2863,9 +2872,11 @@ 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" + (\(\indent=3 notation=\binder PROD\\PROD _:#_. _)\ [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" + (\(\indent=3 notation=\binder \\\\_\#_. _)\ [0, 51, 10] 10) syntax_consts "_prod_mset_image" \ prod_mset translations