# HG changeset patch # User wenzelm # Date 1727639867 -7200 # Node ID 6d34c2bedaa3835be1a5985c408a8d2ec19472ff # Parent 5ea48342e0ae9bb8efcd66e6f36e77d01aa4c135 clarified markup: avoid conflict of "notation" with "entity", e.g. in "[x,y,z]" without spaces; diff -r 5ea48342e0ae -r 6d34c2bedaa3 src/CCL/Set.thy --- a/src/CCL/Set.thy Sun Sep 29 21:40:37 2024 +0200 +++ b/src/CCL/Set.thy Sun Sep 29 21:57:47 2024 +0200 @@ -20,7 +20,7 @@ syntax "_Coll" :: "[idt, o] \ 'a set" (\(\indent=1 notation=\mixfix Collect\\{_./ _})\) syntax_consts - "_Coll" == Collect + Collect translations "{x. P}" == "CONST Collect(\x. P)" diff -r 5ea48342e0ae -r 6d34c2bedaa3 src/CCL/Term.thy --- a/src/CCL/Term.thy Sun Sep 29 21:40:37 2024 +0200 +++ b/src/CCL/Term.thy Sun Sep 29 21:57:47 2024 +0200 @@ -51,7 +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 +syntax_consts let1 translations "let x be a in e" == "CONST let1(a, \x. e)" definition letrec :: "[[i,i\i]\i,(i\i)\i]\i" @@ -73,10 +73,7 @@ (\(\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 +syntax_consts letrec letrec2 letrec3 parse_translation \ let fun abs_tr t u = Syntax_Trans.abs_tr [t, u]; diff -r 5ea48342e0ae -r 6d34c2bedaa3 src/CCL/Type.thy --- a/src/CCL/Type.thy Sun Sep 29 21:40:37 2024 +0200 +++ b/src/CCL/Type.thy Sun Sep 29 21:57:47 2024 +0200 @@ -15,7 +15,7 @@ syntax "_Subtype" :: "[idt, 'a set, o] \ 'a set" (\(\indent=1 notation=\mixfix Subtype\\{_: _ ./ _})\) syntax_consts - "_Subtype" == Subtype + Subtype translations "{x: A. B}" == "CONST Subtype(A, \x. B)" diff -r 5ea48342e0ae -r 6d34c2bedaa3 src/FOL/IFOL.thy --- a/src/FOL/IFOL.thy Sun Sep 29 21:40:37 2024 +0200 +++ b/src/FOL/IFOL.thy Sun Sep 29 21:57:47 2024 +0200 @@ -747,7 +747,8 @@ "" :: \letbind => letbinds\ (\_\) "_binds" :: \[letbind, letbinds] => letbinds\ (\_;/ _\) "_Let" :: \[letbinds, 'a] => 'a\ (\(\notation=\mixfix let in\\let (_)/ in (_))\ 10) -syntax_consts "_Let" \ Let +syntax_consts + Let translations "_Let(_binds(b, bs), e)" == "_Let(b, _Let(bs, e))" "let x = a in e" == "CONST Let(a, \x. e)" diff -r 5ea48342e0ae -r 6d34c2bedaa3 src/ZF/Induct/Multiset.thy --- a/src/ZF/Induct/Multiset.thy Sun Sep 29 21:40:37 2024 +0200 +++ b/src/ZF/Induct/Multiset.thy Sun Sep 29 21:57:47 2024 +0200 @@ -75,7 +75,8 @@ syntax "_MColl" :: "[pttrn, i, o] \ i" (\(\indent=1 notation=\mixfix MCollect\\{# _ \ _./ _#})\) -syntax_consts "_MColl" \ MCollect +syntax_consts + MCollect translations "{#x \ M. P#}" == "CONST MCollect(M, \x. P)" diff -r 5ea48342e0ae -r 6d34c2bedaa3 src/ZF/List.thy --- a/src/ZF/List.thy Sun Sep 29 21:40:37 2024 +0200 +++ b/src/ZF/List.thy Sun Sep 29 21:57:47 2024 +0200 @@ -19,9 +19,9 @@ syntax "" :: "i \ list_args" (\_\) "_List_args" :: "[i, list_args] \ list_args" (\_,/ _\) - "_List" :: "list_args \ i" (\[(_)]\) + "_List" :: "list_args \ i" (\[(\notation=\mixfix list enumeration\\_)]\) syntax_consts - "_List_args" "_List" \ Cons + Cons translations "[x, xs]" == "CONST Cons(x, [xs])" "[x]" == "CONST Cons(x, [])" diff -r 5ea48342e0ae -r 6d34c2bedaa3 src/ZF/ZF_Base.thy --- a/src/ZF/ZF_Base.thy Sun Sep 29 21:40:37 2024 +0200 +++ b/src/ZF/ZF_Base.thy Sun Sep 29 21:57:47 2024 +0200 @@ -57,7 +57,7 @@ syntax "_Replace" :: "[pttrn, pttrn, i, o] \ i" (\(\indent=1 notation=\mixfix Replace\\{_ ./ _ \ _, _})\) syntax_consts - "_Replace" \ Replace + Replace translations "{y. x\A, Q}" \ "CONST Replace(A, \x y. Q)" @@ -70,7 +70,7 @@ syntax "_RepFun" :: "[i, pttrn, i] \ i" (\(\indent=1 notation=\mixfix RepFun\\{_ ./ _ \ _})\ [51,0,51]) syntax_consts - "_RepFun" \ RepFun + RepFun translations "{b. x\A}" \ "CONST RepFun(A, \x. b)" @@ -82,7 +82,7 @@ syntax "_Collect" :: "[pttrn, i, o] \ i" (\(\indent=1 notation=\mixfix Collect\\{_ \ _ ./ _})\) syntax_consts - "_Collect" \ Collect + Collect translations "{x\A. P}" \ "CONST Collect(A, \x. P)" @@ -133,9 +133,9 @@ syntax "" :: "i \ finset_args" (\_\) "_Finset_args" :: "[i, finset_args] \ finset_args" (\_,/ _\) - "_Finset" :: "finset_args \ i" (\{(_)}\) + "_Finset" :: "finset_args \ i" (\{(\notation=\mixfix set enumeration\\_)}\) syntax_consts - "_Finset_args" "_Finset" == cons + cons translations "{x, xs}" == "CONST cons(x, {xs})" "{x}" == "CONST cons(x, 0)" @@ -196,9 +196,9 @@ syntax "" :: "i \ tuple_args" (\_\) "_Tuple_args" :: "[i, tuple_args] \ tuple_args" (\_,/ _\) - "_Tuple" :: "[i, tuple_args] \ i" (\\(\notation=\mixfix tuple\\_,/ _)\\) + "_Tuple" :: "[i, tuple_args] \ i" (\\(\notation=\mixfix tuple enumeration\\_,/ _)\\) syntax_consts - "_Tuple_args" "_Tuple" == Pair + Pair translations "\x, y, z\" == "\x, \y, z\\" "\x, y\" == "CONST Pair(x, y)" diff -r 5ea48342e0ae -r 6d34c2bedaa3 src/ZF/func.thy --- a/src/ZF/func.thy Sun Sep 29 21:40:37 2024 +0200 +++ b/src/ZF/func.thy Sun Sep 29 21:57:47 2024 +0200 @@ -452,7 +452,8 @@ "" :: "updbind \ updbinds" (\_\) "_updbinds" :: "[updbind, updbinds] \ updbinds" (\_,/ _\) "_Update" :: "[i, updbinds] \ i" (\_/'((_)')\ [900,0] 900) -syntax_consts "_Update" "_updbind" \ update +syntax_consts + update translations "_Update (f, _updbinds(b,bs))" == "_Update (_Update(f,b), bs)" "f(x:=y)" == "CONST update(f,x,y)"