# HG changeset patch # User wenzelm # Date 1729254009 -7200 # Node ID fc5066122e68f583a4d6b95792094e05b5598f1e # Parent ff2a637a449e9dec4f2d80f6692bdf9c45096ef3 more inner-syntax markup; diff -r ff2a637a449e -r fc5066122e68 src/CCL/Set.thy --- a/src/CCL/Set.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/CCL/Set.thy Fri Oct 18 14:20:09 2024 +0200 @@ -19,6 +19,8 @@ syntax "_Coll" :: "[idt, o] \ 'a set" (\(\indent=1 notation=\mixfix Collect\\{_./ _})\) +syntax_consts + "_Coll" == Collect translations "{x. P}" == "CONST Collect(\x. P)" diff -r ff2a637a449e -r fc5066122e68 src/CCL/Term.thy --- a/src/CCL/Term.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/CCL/Term.thy Fri Oct 18 14:20:09 2024 +0200 @@ -51,6 +51,7 @@ syntax "_let1" :: "[idt,i,i]\i" (\(\indent=3 notation=\mixfix let be in\\let _ be _/ in _)\ [0,0,60] 60) +syntax_consts "_let1" == let1 translations "let x be a in e" == "CONST let1(a, \x. e)" definition letrec :: "[[i,i\i]\i,(i\i)\i]\i" @@ -72,6 +73,10 @@ (\(\indent=3 notation=\mixfix letrec be in\\letrec _ _ _ be _/ in _)\ [0,0,0,0,60] 60) "_letrec3" :: "[idt,idt,idt,idt,i,i]\i" (\(\indent=3 notation=\mixfix letrec be in\\letrec _ _ _ _ be _/ in _)\ [0,0,0,0,0,60] 60) +syntax_consts + "_letrec" == letrec and + "_letrec2" == letrec2 and + "_letrec3" == letrec3 parse_translation \ let fun abs_tr t u = Syntax_Trans.abs_tr [t, u]; diff -r ff2a637a449e -r fc5066122e68 src/CCL/Type.thy --- a/src/CCL/Type.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/CCL/Type.thy Fri Oct 18 14:20:09 2024 +0200 @@ -14,6 +14,8 @@ syntax "_Subtype" :: "[idt, 'a set, o] \ 'a set" (\(\indent=1 notation=\mixfix Subtype\\{_: _ ./ _})\) +syntax_consts + "_Subtype" == Subtype translations "{x: A. B}" == "CONST Subtype(A, \x. B)" diff -r ff2a637a449e -r fc5066122e68 src/FOL/IFOL.thy --- a/src/FOL/IFOL.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/FOL/IFOL.thy Fri Oct 18 14:20:09 2024 +0200 @@ -747,6 +747,8 @@ "" :: \letbind => letbinds\ (\_\) "_binds" :: \[letbind, letbinds] => letbinds\ (\_;/ _\) "_Let" :: \[letbinds, 'a] => 'a\ (\(\notation=\mixfix let expression\\let (_)/ in (_))\ 10) +syntax_consts + "_Let" \ Let translations "_Let(_binds(b, bs), e)" == "_Let(b, _Let(bs, e))" "let x = a in e" == "CONST Let(a, \x. e)" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Analysis/Bochner_Integration.thy --- a/src/HOL/Analysis/Bochner_Integration.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Analysis/Bochner_Integration.thy Fri Oct 18 14:20:09 2024 +0200 @@ -892,20 +892,16 @@ syntax "_lebesgue_integral" :: "pttrn \ real \ 'a measure \ real" (\(\indent=1 notation=\binder integral\\\(2 _./ _)/ \_)\ [60,61] 110) - syntax_consts "_lebesgue_integral" == lebesgue_integral - translations "\ x. f \M" == "CONST lebesgue_integral M (\x. f)" syntax "_ascii_lebesgue_integral" :: "pttrn \ 'a measure \ real \ real" (\(\indent=3 notation=\mixfix LINT\\LINT (1_)/|(_)./ _)\ [0,110,60] 60) - syntax_consts "_ascii_lebesgue_integral" == lebesgue_integral - translations "LINT x|M. f" == "CONST lebesgue_integral M (\x. f)" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Analysis/Interval_Integral.thy --- a/src/HOL/Analysis/Interval_Integral.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Analysis/Interval_Integral.thy Fri Oct 18 14:20:09 2024 +0200 @@ -147,10 +147,8 @@ syntax "_ascii_interval_lebesgue_integral" :: "pttrn \ real \ real \ real measure \ real \ real" (\(\indent=5 notation=\binder LINT\\LINT _=_.._|_. _)\ [0,60,60,61,100] 60) - syntax_consts "_ascii_interval_lebesgue_integral" == interval_lebesgue_integral - translations "LINT x=a..b|M. f" == "CONST interval_lebesgue_integral M a b (\x. f)" @@ -161,10 +159,8 @@ syntax "_ascii_interval_lebesgue_borel_integral" :: "pttrn \ real \ real \ real \ real" (\(\indent=4 notation=\binder LBINT\\LBINT _=_.._. _)\ [0,60,60,61] 60) - syntax_consts "_ascii_interval_lebesgue_borel_integral" == interval_lebesgue_integral - translations "LBINT x=a..b. f" == "CONST interval_lebesgue_integral CONST lborel a b (\x. f)" @@ -1050,18 +1046,14 @@ syntax "_complex_lebesgue_borel_integral" :: "pttrn \ real \ complex" (\(\indent=2 notation=\binder CLBINT\\CLBINT _. _)\ [0,60] 60) - syntax_consts "_complex_lebesgue_borel_integral" == complex_lebesgue_integral - translations "CLBINT x. f" == "CONST complex_lebesgue_integral CONST lborel (\x. f)" syntax "_complex_set_lebesgue_borel_integral" :: "pttrn \ real set \ real \ complex" (\(\indent=3 notation=\binder CLBINT\\CLBINT _:_. _)\ [0,60,61] 60) - syntax_consts "_complex_set_lebesgue_borel_integral" == complex_set_lebesgue_integral - translations "CLBINT x:A. f" == "CONST complex_set_lebesgue_integral CONST lborel A (\x. f)" @@ -1076,10 +1068,8 @@ syntax "_ascii_complex_interval_lebesgue_borel_integral" :: "pttrn \ ereal \ ereal \ real \ complex" (\(\indent=4 notation=\binder CLBINT\\CLBINT _=_.._. _)\ [0,60,60,61] 60) - syntax_consts "_ascii_complex_interval_lebesgue_borel_integral" == complex_interval_lebesgue_integral - translations "CLBINT x=a..b. f" == "CONST complex_interval_lebesgue_integral CONST lborel a b (\x. f)" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy --- a/src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy Fri Oct 18 14:20:09 2024 +0200 @@ -820,10 +820,8 @@ syntax "_nn_integral" :: "pttrn \ ennreal \ 'a measure \ ennreal" (\(\indent=2 notation=\binder integral\\\\<^sup>+(2 _./ _)/ \_)\ [60,61] 110) - syntax_consts "_nn_integral" == nn_integral - translations "\\<^sup>+x. f \M" == "CONST nn_integral M (\x. f)" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Analysis/Set_Integral.thy --- a/src/HOL/Analysis/Set_Integral.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Analysis/Set_Integral.thy Fri Oct 18 14:20:09 2024 +0200 @@ -25,10 +25,8 @@ syntax "_ascii_set_lebesgue_integral" :: "pttrn \ 'a set \ 'a measure \ real \ real" (\(\indent=4 notation=\binder LINT\\LINT (_):(_)/|(_)./ _)\ [0,0,0,10] 10) - syntax_consts "_ascii_set_lebesgue_integral" == set_lebesgue_integral - translations "LINT x:A|M. f" == "CONST set_lebesgue_integral M A (\x. f)" @@ -621,10 +619,8 @@ syntax "_ascii_complex_set_lebesgue_integral" :: "pttrn \ 'a set \ 'a measure \ real \ real" (\(\indent=4 notation=\binder CLINT\\CLINT _:_|_. _)\ [0,0,0,10] 10) - syntax_consts "_ascii_complex_set_lebesgue_integral" == complex_set_lebesgue_integral - translations "CLINT x:A|M. f" == "CONST complex_set_lebesgue_integral M A (\x. f)" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Auth/Message.thy --- a/src/HOL/Auth/Message.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Auth/Message.thy Fri Oct 18 14:20:09 2024 +0200 @@ -51,6 +51,8 @@ text\Concrete syntax: messages appear as \\A,B,NA\\, etc...\ syntax "_MTuple" :: "['a, args] \ 'a * 'b" (\(\indent=2 notation=\mixfix message tuple\\\_,/ _\)\) +syntax_consts + "_MTuple" \ MPair translations "\x, y, z\" \ "\x, \y, z\\" "\x, y\" \ "CONST MPair x y" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Codegenerator_Test/Code_Lazy_Test.thy --- a/src/HOL/Codegenerator_Test/Code_Lazy_Test.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Codegenerator_Test/Code_Lazy_Test.thy Fri Oct 18 14:20:09 2024 +0200 @@ -25,6 +25,8 @@ no_notation lazy_llist (\_\) syntax "_llist" :: "args => 'a list" (\(\indent=1 notation=\mixfix lazy list enumeration\\\<^bold>[_\<^bold>])\) +syntax_consts + "_llist" \ lazy_llist translations "\<^bold>[x, xs\<^bold>]" == "x\<^bold>#\<^bold>[xs\<^bold>]" "\<^bold>[x\<^bold>]" == "x\<^bold>#\<^bold>[\<^bold>]" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Computational_Algebra/Polynomial.thy --- a/src/HOL/Computational_Algebra/Polynomial.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Computational_Algebra/Polynomial.thy Fri Oct 18 14:20:09 2024 +0200 @@ -350,6 +350,8 @@ syntax "_poly" :: "args \ 'a poly" (\(\indent=2 notation=\mixfix polynomial enumeration\\[:_:])\) +syntax_consts + "_poly" \ pCons translations "[:x, xs:]" \ "CONST pCons x [:xs:]" "[:x:]" \ "CONST pCons x 0" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Filter.thy --- a/src/HOL/Filter.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Filter.thy Fri Oct 18 14:20:09 2024 +0200 @@ -1308,10 +1308,8 @@ syntax "_LIM" :: "pttrns \ 'a \ 'b \ 'a \ bool" (\(\indent=3 notation=\binder LIM\\LIM (_)/ (_)./ (_) :> (_))\ [1000, 10, 0, 10] 10) - syntax_consts "_LIM" == filterlim - translations "LIM x F1. f :> F2" == "CONST filterlim (\x. f) F2 F1" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Fun.thy --- a/src/HOL/Fun.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Fun.thy Fri Oct 18 14:20:09 2024 +0200 @@ -846,7 +846,8 @@ "_updbinds":: "updbind \ updbinds \ updbinds" (\_,/ _\) "_Update" :: "'a \ updbinds \ 'a" (\(\open_block notation=\mixfix function update\\_/'((2_)'))\ [1000, 0] 900) - +syntax_consts + "_Update" \ fun_upd translations "_Update f (_updbinds b bs)" \ "_Update (_Update f b) bs" "f(x:=y)" \ "CONST fun_upd f x y" diff -r ff2a637a449e -r fc5066122e68 src/HOL/HOLCF/Sprod.thy --- a/src/HOL/HOLCF/Sprod.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/HOLCF/Sprod.thy Fri Oct 18 14:20:09 2024 +0200 @@ -42,6 +42,8 @@ syntax "_stuple" :: "[logic, args] \ logic" (\(\indent=1 notation=\mixfix strict tuple\\'(:_,/ _:'))\) +syntax_consts + "_stuple" \ spair translations "(:x, y, z:)" \ "(:x, (:y, z:):)" "(:x, y:)" \ "CONST spair\x\y" diff -r ff2a637a449e -r fc5066122e68 src/HOL/HOLCF/ex/Letrec.thy --- a/src/HOL/HOLCF/ex/Letrec.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/HOLCF/ex/Letrec.thy Fri Oct 18 14:20:09 2024 +0200 @@ -22,6 +22,9 @@ "_recbinds" :: "[recbindt, recbinds] \ recbinds" (\_;/ _\) "_Letrec" :: "[recbinds, logic] \ logic" (\(\notation=\mixfix Letrec expression\\Letrec (_)/ in (_))\ 10) +syntax_consts + "_Letrec" \ CLetrec + translations (recbindt) "x = a, (y,ys) = (b,bs)" == (recbindt) "(x,y,ys) = (a,b,bs)" (recbindt) "x = a, y = b" == (recbindt) "(x,y) = (a,b)" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Library/FSet.thy --- a/src/HOL/Library/FSet.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Library/FSet.thy Fri Oct 18 14:20:09 2024 +0200 @@ -166,6 +166,8 @@ syntax "_fset" :: "args => 'a fset" (\(\indent=2 notation=\mixfix finite set enumeration\\{|_|})\) +syntax_consts + "_fset" \ finsert translations "{|x, xs|}" == "CONST finsert x {|xs|}" "{|x|}" == "CONST finsert x {||}" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Library/Multiset.thy --- a/src/HOL/Library/Multiset.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Library/Multiset.thy Fri Oct 18 14:20:09 2024 +0200 @@ -93,6 +93,8 @@ syntax "_multiset" :: "args \ 'a multiset" (\(\indent=2 notation=\mixfix multiset enumeration\\{#_#})\) +syntax_consts + "_multiset" \ add_mset translations "{#x, xs#}" == "CONST add_mset x {#xs#}" "{#x#}" == "CONST add_mset x {#}" diff -r ff2a637a449e -r fc5066122e68 src/HOL/List.thy --- a/src/HOL/List.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/List.thy Fri Oct 18 14:20:09 2024 +0200 @@ -56,6 +56,8 @@ syntax "_list" :: "args \ 'a list" (\(\indent=1 notation=\mixfix list enumeration\\[_])\) end +syntax_consts + "_list" \ Cons translations "[x, xs]" \ "x#[xs]" "[x]" \ "x#[]" @@ -144,7 +146,8 @@ "_lupdbinds" :: "[lupdbind, lupdbinds] => lupdbinds" (\_,/ _\) "_LUpdate" :: "['a, lupdbinds] => 'a" (\(\open_block notation=\mixfix list update\\_/[(_)])\ [1000,0] 900) - +syntax_consts + "_LUpdate" \ list_update translations "_LUpdate xs (_lupdbinds b bs)" == "_LUpdate (_LUpdate xs b) bs" "xs[i:=x]" == "CONST list_update xs i x" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Metis_Examples/Message.thy --- a/src/HOL/Metis_Examples/Message.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Metis_Examples/Message.thy Fri Oct 18 14:20:09 2024 +0200 @@ -50,6 +50,8 @@ text\Concrete syntax: messages appear as \\A,B,NA\\, etc...\ syntax "_MTuple" :: "['a, args] \ 'a * 'b" (\(\indent=2 notation=\mixfix message tuple\\\_,/ _\)\) +syntax_consts + "_MTuple" \ MPair translations "\x, y, z\" \ "\x, \y, z\\" "\x, y\" \ "CONST MPair x y" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Probability/Probability_Measure.thy --- a/src/HOL/Probability/Probability_Measure.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Probability/Probability_Measure.thy Fri Oct 18 14:20:09 2024 +0200 @@ -249,10 +249,8 @@ syntax "_prob" :: "pttrn \ logic \ logic \ logic" (\('\

'((/_ in _./ _)'))\) - syntax_consts "_prob" == measure - translations "\

(x in M. P)" => "CONST measure M {x \ CONST space M. P}" @@ -324,10 +322,8 @@ syntax "_conditional_prob" :: "pttrn \ logic \ logic \ logic \ logic" (\('\

'(_ in _. _ \/ _'))\) - syntax_consts "_conditional_prob" == cond_prob - translations "\

(x in M. P \ Q)" => "CONST cond_prob M (\x. P) (\x. Q)" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Prolog/Test.thy --- a/src/HOL/Prolog/Test.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Prolog/Test.thy Fri Oct 18 14:20:09 2024 +0200 @@ -20,6 +20,8 @@ syntax "_list" :: "args => 'a list" (\(\indent=1 notation=\mixfix list enumeration\\[_])\) +syntax_consts + "_list" \ Cons translations "[x, xs]" == "x#[xs]" "[x]" == "x#[]" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Quotient_Examples/Lift_FSet.thy --- a/src/HOL/Quotient_Examples/Lift_FSet.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Quotient_Examples/Lift_FSet.thy Fri Oct 18 14:20:09 2024 +0200 @@ -97,6 +97,8 @@ syntax "_fset" :: "args => 'a fset" (\(\indent=2 notation=\mixfix finite set enumeration\\{|_|})\) +syntax_consts + "_fset" == fcons translations "{|x, xs|}" == "CONST fcons x {|xs|}" "{|x|}" == "CONST fcons x {||}" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Quotient_Examples/Quotient_FSet.thy --- a/src/HOL/Quotient_Examples/Quotient_FSet.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Quotient_Examples/Quotient_FSet.thy Fri Oct 18 14:20:09 2024 +0200 @@ -290,6 +290,8 @@ syntax "_fset" :: "args => 'a fset" (\(\indent=2 notation=\mixfix finite set enumeration\\{|_|})\) +syntax_consts + "_fset" \ insert_fset translations "{|x, xs|}" == "CONST insert_fset x {|xs|}" "{|x|}" == "CONST insert_fset x {||}" diff -r ff2a637a449e -r fc5066122e68 src/HOL/SET_Protocol/Message_SET.thy --- a/src/HOL/SET_Protocol/Message_SET.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/SET_Protocol/Message_SET.thy Fri Oct 18 14:20:09 2024 +0200 @@ -70,6 +70,8 @@ (*Concrete syntax: messages appear as \\A,B,NA\\, etc...*) syntax "_MTuple" :: "['a, args] \ 'a * 'b" (\(\indent=2 notation=\mixfix message tuple\\\_,/ _\)\) +syntax_consts + "_MTuple" \ MPair translations "\x, y, z\" \ "\x, \y, z\\" "\x, y\" \ "CONST MPair x y" diff -r ff2a637a449e -r fc5066122e68 src/HOL/SPARK/SPARK_Setup.thy --- a/src/HOL/SPARK/SPARK_Setup.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/SPARK/SPARK_Setup.thy Fri Oct 18 14:20:09 2024 +0200 @@ -55,11 +55,9 @@ "fun_upds f xs y z = (if z \ xs then y else f z)" syntax - "_updsbind" :: "['a, 'a] => updbind" (\(2_ [:=]/ _)\) - + "_updsbind" :: "['a, 'a] => updbind" (\(\indent=2 notation=\infix update set\\_ [:=]/ _)\) syntax_consts "_updsbind" == fun_upds - translations "f(xs[:=]y)" == "CONST fun_upds f xs y" diff -r ff2a637a449e -r fc5066122e68 src/HOL/Set.thy --- a/src/HOL/Set.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/Set.thy Fri Oct 18 14:20:09 2024 +0200 @@ -43,6 +43,8 @@ syntax "_Coll" :: "pttrn \ bool \ 'a set" (\(\indent=1 notation=\mixfix set comprehension\\{_./ _})\) +syntax_consts + "_Coll" \ Collect translations "{x. P}" \ "CONST Collect (\x. P)" @@ -156,6 +158,8 @@ syntax "_Finset" :: "args \ 'a set" (\(\indent=1 notation=\mixfix set enumeration\\{_})\) +syntax_consts + "_Finset" \ insert translations "{x, xs}" \ "CONST insert x {xs}" "{x}" \ "CONST insert x {}" diff -r ff2a637a449e -r fc5066122e68 src/HOL/UNITY/Union.thy --- a/src/HOL/UNITY/Union.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/UNITY/Union.thy Fri Oct 18 14:20:09 2024 +0200 @@ -39,8 +39,8 @@ where "safety_prop X \ SKIP \ X \ (\G. Acts G \ \(Acts ` X) \ G \ X)" syntax - "_JOIN1" :: "[pttrns, 'b set] => 'b set" (\(3\_./ _)\ 10) - "_JOIN" :: "[pttrn, 'a set, 'b set] => 'b set" (\(3\_\_./ _)\ 10) + "_JOIN1" :: "[pttrns, 'b set] => 'b set" (\(\indent=3 notation=\binder \\\\_./ _)\ 10) + "_JOIN" :: "[pttrn, 'a set, 'b set] => 'b set" (\(\indent=3 notation=\binder \\\\_\_./ _)\ 10) syntax_consts "_JOIN1" "_JOIN" == JOIN translations diff -r ff2a637a449e -r fc5066122e68 src/HOL/ex/Code_Lazy_Demo.thy --- a/src/HOL/ex/Code_Lazy_Demo.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/HOL/ex/Code_Lazy_Demo.thy Fri Oct 18 14:20:09 2024 +0200 @@ -41,6 +41,8 @@ syntax "_llist" :: "args => 'a list" (\(\indent=1 notation=\mixfix lazy list enumeration\\\<^bold>\_\<^bold>\)\) +syntax_consts + "_llist" == LCons translations "\<^bold>\x, xs\<^bold>\" == "x###\<^bold>\xs\<^bold>\" "\<^bold>\x\<^bold>\" == "x###\<^bold>\\<^bold>\" diff -r ff2a637a449e -r fc5066122e68 src/Pure/Examples/Higher_Order_Logic.thy --- a/src/Pure/Examples/Higher_Order_Logic.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/Pure/Examples/Higher_Order_Logic.thy Fri Oct 18 14:20:09 2024 +0200 @@ -401,7 +401,7 @@ axiomatization Eps :: "('a \ o) \ 'a" where someI: "P x \ P (Eps P)" -syntax "_Eps" :: "pttrn \ o \ 'a" (\(3SOME _./ _)\ [0, 10] 10) +syntax "_Eps" :: "pttrn \ o \ 'a" (\(\indent=3 notation=\binder SOME\\SOME _./ _)\ [0, 10] 10) syntax_consts "_Eps" \ Eps translations "SOME x. P" \ "CONST Eps (\x. P)" diff -r ff2a637a449e -r fc5066122e68 src/Pure/pure_thy.ML --- a/src/Pure/pure_thy.ML Fri Oct 18 11:44:05 2024 +0200 +++ b/src/Pure/pure_thy.ML Fri Oct 18 14:20:09 2024 +0200 @@ -172,7 +172,8 @@ ("_position", typ "float_token \ float_position", Mixfix.mixfix "_"), ("_constify", typ "num_position \ num_const", Mixfix.mixfix "_"), ("_constify", typ "float_position \ float_const", Mixfix.mixfix "_"), - ("_index", typ "logic \ index", Mixfix.mixfix "(\unbreakable\\<^bsub>_\<^esub>)"), + ("_index", typ "logic \ index", + Mixfix.mixfix "(\unbreakable notation=\mixfix index\\\<^bsub>_\<^esub>)"), ("_indexdefault", typ "index", Mixfix.mixfix ""), ("_indexvar", typ "index", Mixfix.mixfix "'\"), ("_struct", typ "index \ logic", NoSyn), @@ -251,7 +252,10 @@ #> Sign.parse_translation Syntax_Trans.pure_parse_translation #> Sign.print_ast_translation Syntax_Trans.pure_print_ast_translation #> Sign.syntax_deps - [("_bracket", ["\<^type>fun"]), ("_bigimpl", ["\<^const>Pure.imp"])] + [("_bracket", ["\<^type>fun"]), + ("_bigimpl", ["\<^const>Pure.imp"]), + ("_TYPE", ["\<^const>Pure.type"]), + ("_TERM", ["\<^const>Pure.term"])] #> Sign.add_consts [(qualify (Binding.make ("term", \<^here>)), typ "'a \ prop", NoSyn), (qualify (Binding.make ("sort_constraint", \<^here>)), typ "'a itself \ prop", NoSyn), diff -r ff2a637a449e -r fc5066122e68 src/ZF/Induct/Multiset.thy --- a/src/ZF/Induct/Multiset.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/ZF/Induct/Multiset.thy Fri Oct 18 14:20:09 2024 +0200 @@ -75,6 +75,8 @@ syntax "_MColl" :: "[pttrn, i, o] \ i" (\(\indent=1 notation=\mixfix multiset comprehension\\{# _ \ _./ _#})\) +syntax_consts + "_MColl" \ MCollect translations "{#x \ M. P#}" == "CONST MCollect(M, \x. P)" diff -r ff2a637a449e -r fc5066122e68 src/ZF/ZF_Base.thy --- a/src/ZF/ZF_Base.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/ZF/ZF_Base.thy Fri Oct 18 14:20:09 2024 +0200 @@ -56,6 +56,8 @@ syntax "_Replace" :: "[pttrn, pttrn, i, o] \ i" (\(\indent=1 notation=\mixfix relational replacement\\{_ ./ _ \ _, _})\) +syntax_consts + "_Replace" \ Replace translations "{y. x\A, Q}" \ "CONST Replace(A, \x y. Q)" @@ -67,6 +69,8 @@ syntax "_RepFun" :: "[i, pttrn, i] \ i" (\(\indent=1 notation=\mixfix functional replacement\\{_ ./ _ \ _})\ [51,0,51]) +syntax_consts + "_RepFun" \ RepFun translations "{b. x\A}" \ "CONST RepFun(A, \x. b)" @@ -77,6 +81,8 @@ syntax "_Collect" :: "[pttrn, i, o] \ i" (\(\indent=1 notation=\mixfix set comprehension\\{_ \ _ ./ _})\) +syntax_consts + "_Collect" \ Collect translations "{x\A. P}" \ "CONST Collect(A, \x. P)" diff -r ff2a637a449e -r fc5066122e68 src/ZF/func.thy --- a/src/ZF/func.thy Fri Oct 18 11:44:05 2024 +0200 +++ b/src/ZF/func.thy Fri Oct 18 14:20:09 2024 +0200 @@ -452,6 +452,8 @@ "" :: "updbind \ updbinds" (\_\) "_updbinds" :: "[updbind, updbinds] \ updbinds" (\_,/ _\) "_Update" :: "[i, updbinds] \ i" (\(\open_block notation=\mixfix function update\\_/'((_)'))\ [900,0] 900) +syntax_consts + "_Update" \ update translations "_Update (f, _updbinds(b,bs))" == "_Update (_Update(f,b), bs)" "f(x:=y)" == "CONST update(f,x,y)"