diff -r 079fe4292526 -r c7723cc15de8 src/HOL/Library/Multiset.thy --- a/src/HOL/Library/Multiset.thy Sun Aug 25 20:54:20 2024 +0200 +++ b/src/HOL/Library/Multiset.thy Sun Aug 25 21:10:01 2024 +0200 @@ -93,6 +93,8 @@ syntax "_multiset" :: "args \ 'a multiset" ("{#(_)#}") +syntax_consts + "_multiset" == add_mset translations "{#x, xs#}" == "CONST add_mset x {#xs#}" "{#x#}" == "CONST add_mset x {#}" @@ -169,6 +171,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 + "_MBex" \ Multiset.Bex + translations "\x\#A. P" \ "CONST Multiset.Ball A (\x. P)" "\x\#A. P" \ "CONST Multiset.Bex A (\x. P)" @@ -1248,6 +1254,8 @@ "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" ("(1{#_ :# _./ _#})") syntax "_MCollect" :: "pttrn \ 'a multiset \ bool \ 'a multiset" ("(1{#_ \# _./ _#})") +syntax_consts + "_MCollect" == filter_mset translations "{#x \# M. P#}" == "CONST filter_mset (\x. P) M" @@ -1821,6 +1829,8 @@ "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" ("({#_/. _ :# _#})") syntax "_comprehension_mset" :: "'a \ 'b \ 'b multiset \ 'a multiset" ("({#_/. _ \# _#})") +syntax_consts + "_comprehension_mset" \ image_mset translations "{#e. x \# M#}" \ "CONST image_mset (\x. e) M" @@ -1828,6 +1838,8 @@ "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" ("({#_/ | _ :# _./ _#})") syntax "_comprehension_mset'" :: "'a \ 'b \ 'b multiset \ bool \ 'a multiset" ("({#_/ | _ \# _./ _#})") +syntax_consts + "_comprehension_mset'" \ image_mset translations "{#e | x\#M. P#}" \ "{#e. x \# {# x\#M. P#}#}" @@ -2675,6 +2687,8 @@ "_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) +syntax_consts + "_sum_mset_image" \ sum_mset translations "\i \# A. b" \ "CONST sum_mset (CONST image_mset (\i. b) A)" @@ -2854,6 +2868,8 @@ "_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) +syntax_consts + "_prod_mset_image" \ prod_mset translations "\i \# A. b" \ "CONST prod_mset (CONST image_mset (\i. b) A)"