# HG changeset patch # User wenzelm # Date 1728382235 -7200 # Node ID ec121999a9cbe3265571352d916f358f86023416 # Parent 6ce0c8d59f5acfaaf9f11117dc3b07bd95a8de95 more inner-syntax markup; more syntax bundles for use with "unbundle no foobar_syntax"; diff -r 6ce0c8d59f5a -r ec121999a9cb NEWS --- a/NEWS Sun Oct 06 22:56:07 2024 +0200 +++ b/NEWS Tue Oct 08 12:10:35 2024 +0200 @@ -69,6 +69,9 @@ unbundle no rtrancl_syntax unbundle no trancl_syntax unbundle no reflcl_syntax + unbundle no abs_syntax + unbundle no floor_ceiling_syntax + unbundle no uminus_syntax This is more robust than individual 'no_syntax' / 'no_notation' commands, which need to copy mixfix declarations from elsewhere and thus diff -r 6ce0c8d59f5a -r ec121999a9cb src/FOL/IFOL.thy --- a/src/FOL/IFOL.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/FOL/IFOL.thy Tue Oct 08 12:10:35 2024 +0200 @@ -82,7 +82,7 @@ definition \True \ False \ False\ -definition Not (\\ _\ [40] 40) +definition Not (\(\open_block notation=\prefix \\\\ _)\ [40] 40) where not_def: \\ P \ P \ False\ definition iff (infixr \\\ 25) diff -r 6ce0c8d59f5a -r ec121999a9cb src/FOLP/IFOLP.thy --- a/src/FOLP/IFOLP.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/FOLP/IFOLP.thy Tue Oct 08 12:10:35 2024 +0200 @@ -155,7 +155,7 @@ (**** Definitions ****) -definition Not :: "o => o" (\~ _\ [40] 40) +definition Not :: "o => o" (\(\open_block notation=\prefix ~\\~ _)\ [40] 40) where not_def: "~P == P-->False" definition iff :: "[o,o] => o" (infixr \<->\ 25) diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Archimedean_Field.thy --- a/src/HOL/Archimedean_Field.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Archimedean_Field.thy Tue Oct 08 12:10:35 2024 +0200 @@ -205,7 +205,7 @@ subsection \Floor function\ class floor_ceiling = archimedean_field + - fixes floor :: "'a \ int" (\\_\\) + fixes floor :: "'a \ int" (\(\open_block notation=\mixfix floor\\\_\)\) assumes floor_correct: "of_int \x\ \ x \ x < of_int (\x\ + 1)" lemma floor_unique: "of_int z \ x \ x < of_int z + 1 \ \x\ = z" @@ -427,7 +427,7 @@ subsection \Ceiling function\ -definition ceiling :: "'a::floor_ceiling \ int" (\\_\\) +definition ceiling :: "'a::floor_ceiling \ int" (\(\open_block notation=\mixfix ceiling\\\_\)\) where "\x\ = - \- x\" lemma ceiling_correct: "of_int \x\ - 1 < x \ x \ of_int \x\" @@ -861,4 +861,10 @@ finally show ?thesis . qed +bundle floor_ceiling_syntax +begin +notation floor (\(\open_block notation=\mixfix floor\\\_\)\) + and ceiling (\(\open_block notation=\mixfix ceiling\\\_\)\) end + +end diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/BNF_Cardinal_Order_Relation.thy --- a/src/HOL/BNF_Cardinal_Order_Relation.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/BNF_Cardinal_Order_Relation.thy Tue Oct 08 12:10:35 2024 +0200 @@ -117,7 +117,7 @@ We shall prove that this notion is unique up to order isomorphism, meaning that order isomorphism shall be the true identity of cardinals.\ -definition card_of :: "'a set \ 'a rel" (\|_|\ ) +definition card_of :: "'a set \ 'a rel" (\(\open_block notation=\mixfix card_of\\|_|)\) where "card_of A = (SOME r. card_order_on A r)" lemma card_of_card_order_on: "card_order_on A |A|" diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/BNF_Def.thy --- a/src/HOL/BNF_Def.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/BNF_Def.thy Tue Oct 08 12:10:35 2024 +0200 @@ -84,7 +84,7 @@ lemma collect_comp: "collect F \ g = collect ((\f. f \ g) ` F)" by (rule ext) (simp add: collect_def) -definition convol (\\(_,/ _)\\) where +definition convol (\(\indent=1 notation=\mixfix convol\\\_,/ _\)\) where "\f, g\ \ \a. (f a, g a)" lemma fst_convol: "fst \ \f, g\ = f" diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Boolean_Algebras.thy --- a/src/HOL/Boolean_Algebras.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Boolean_Algebras.thy Tue Oct 08 12:10:35 2024 +0200 @@ -14,7 +14,7 @@ locale abstract_boolean_algebra = conj: abel_semigroup \(\<^bold>\)\ + disj: abel_semigroup \(\<^bold>\)\ for conj :: \'a \ 'a \ 'a\ (infixr \\<^bold>\\ 70) and disj :: \'a \ 'a \ 'a\ (infixr \\<^bold>\\ 65) + - fixes compl :: \'a \ 'a\ (\\<^bold>- _\ [81] 80) + fixes compl :: \'a \ 'a\ (\(\open_block notation=\prefix \<^bold>-\\\<^bold>- _)\ [81] 80) and zero :: \'a\ (\\<^bold>0\) and one :: \'a\ (\\<^bold>1\) assumes conj_disj_distrib: \x \<^bold>\ (y \<^bold>\ z) = (x \<^bold>\ y) \<^bold>\ (x \<^bold>\ z)\ diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Complete_Lattices.thy --- a/src/HOL/Complete_Lattices.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Complete_Lattices.thy Tue Oct 08 12:10:35 2024 +0200 @@ -15,10 +15,10 @@ subsection \Syntactic infimum and supremum operations\ class Inf = - fixes Inf :: "'a set \ 'a" (\\ _\ [900] 900) + fixes Inf :: "'a set \ 'a" (\(\open_block notation=\prefix \\\\ _)\ [900] 900) class Sup = - fixes Sup :: "'a set \ 'a" (\\ _\ [900] 900) + fixes Sup :: "'a set \ 'a" (\(\open_block notation=\prefix \\\\ _)\ [900] 900) syntax "_INF1" :: "pttrns \ 'b \ 'b" (\(\indent=3 notation=\binder INF\\INF _./ _)\ [0, 10] 10) diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Fun.thy --- a/src/HOL/Fun.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Fun.thy Tue Oct 08 12:10:35 2024 +0200 @@ -844,7 +844,8 @@ "_updbind" :: "'a \ 'a \ updbind" (\(\indent=2 notation=\mixfix update\\_ :=/ _)\) "" :: "updbind \ updbinds" (\_\) "_updbinds":: "updbind \ updbinds \ updbinds" (\_,/ _\) - "_Update" :: "'a \ updbinds \ 'a" (\_/'((2_)')\ [1000, 0] 900) + "_Update" :: "'a \ updbinds \ 'a" + (\(\open_block notation=\mixfix function update\\_/'((2_)'))\ [1000, 0] 900) translations "_Update f (_updbinds b bs)" \ "_Update (_Update f b) bs" diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/GCD.thy --- a/src/HOL/GCD.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/GCD.thy Tue Oct 08 12:10:35 2024 +0200 @@ -2851,7 +2851,7 @@ definition (in semiring_1) semiring_char :: "'a itself \ nat" where "semiring_char _ = Gcd {n. of_nat n = (0 :: 'a)}" -syntax "_type_char" :: "type => nat" (\(\indent=1 notation=\prefix CHAR\\CHAR/(1'(_')))\) +syntax "_type_char" :: "type => nat" (\(\indent=1 notation=\mixfix CHAR\\CHAR/(1'(_')))\) syntax_consts "_type_char" \ semiring_char translations "CHAR('t)" \ "CONST semiring_char (CONST Pure.type :: 't itself)" print_translation \ diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Groups.thy --- a/src/HOL/Groups.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Groups.thy Tue Oct 08 12:10:35 2024 +0200 @@ -198,11 +198,16 @@ fixes minus :: "'a \ 'a \ 'a" (infixl \-\ 65) class uminus = - fixes uminus :: "'a \ 'a" (\- _\ [81] 80) + fixes uminus :: "'a \ 'a" (\(\open_block notation=\prefix -\\- _)\ [81] 80) class times = fixes times :: "'a \ 'a \ 'a" (infixl \*\ 70) +bundle uminus_syntax +begin +notation uminus (\(\open_block notation=\prefix -\\- _)\ [81] 80) +end + subsection \Semigroups and Monoids\ @@ -1164,7 +1169,12 @@ end class abs = - fixes abs :: "'a \ 'a" (\\_\\) + fixes abs :: "'a \ 'a" (\(\open_block notation=\mixfix abs\\\_\)\) + +bundle abs_syntax +begin +notation abs (\(\open_block notation=\mixfix abs\\\_\)\) +end class sgn = fixes sgn :: "'a \ 'a" diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Groups_Big.thy --- a/src/HOL/Groups_Big.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Groups_Big.thy Tue Oct 08 12:10:35 2024 +0200 @@ -1415,7 +1415,7 @@ sublocale prod: comm_monoid_set times 1 defines prod = prod.F and prod' = prod.G .. -abbreviation Prod (\\_\ [1000] 999) +abbreviation Prod (\(\open_block notation=\prefix \\\\_)\ [1000] 999) where "\A \ prod (\x. x) A" end diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/HOL.thy --- a/src/HOL/HOL.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/HOL.thy Tue Oct 08 12:10:35 2024 +0200 @@ -109,7 +109,7 @@ definition False :: bool where "False \ (\P. P)" -definition Not :: "bool \ bool" (\\ _\ [40] 40) +definition Not :: "bool \ bool" (\(\open_block notation=\prefix \\\\ _)\ [40] 40) where not_def: "\ P \ P \ False" definition conj :: "[bool, bool] \ bool" (infixr \\\ 35) @@ -169,7 +169,7 @@ where "x \ y \ \ (x = y)" notation (ASCII) - Not (\~ _\ [40] 40) and + Not (\(\open_block notation=\prefix ~\\~ _)\ [40] 40) and conj (infixr \&\ 35) and disj (infixr \|\ 30) and implies (infixr \-->\ 25) and @@ -191,11 +191,13 @@ nonterminal case_syn and cases_syn syntax "_case_syntax" :: "['a, cases_syn] \ 'b" (\(\notation=\mixfix case expression\\case _ of/ _)\ 10) - "_case1" :: "['a, 'b] \ case_syn" (\(\indent=2 notation=\mixfix case clause\\_ \/ _)\ 10) + "_case1" :: "['a, 'b] \ case_syn" + (\(\indent=2 notation=\mixfix case clause\\(\open_block notation=\pattern case\\_) \/ _)\ 10) "" :: "case_syn \ cases_syn" (\_\) "_case2" :: "[case_syn, cases_syn] \ cases_syn" (\_/ | _\) syntax (ASCII) - "_case1" :: "['a, 'b] \ case_syn" (\(\indent=2 notation=\mixfix case clause\\_ =>/ _)\ 10) + "_case1" :: "['a, 'b] \ case_syn" + (\(\indent=2 notation=\mixfix case clause\\(\open_block notation=\pattern case\\_) =>/ _)\ 10) notation (ASCII) All (binder \ALL \ 10) and diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/List.thy --- a/src/HOL/List.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/List.thy Tue Oct 08 12:10:35 2024 +0200 @@ -136,10 +136,11 @@ nonterminal lupdbinds and lupdbind syntax - "_lupdbind":: "['a, 'a] => lupdbind" (\(\indent=2 notation=\mixfix list update\\_ :=/ _)\) + "_lupdbind":: "['a, 'a] => lupdbind" (\(\indent=2 notation=\mixfix update\\_ :=/ _)\) "" :: "lupdbind => lupdbinds" (\_\) "_lupdbinds" :: "[lupdbind, lupdbinds] => lupdbinds" (\_,/ _\) - "_LUpdate" :: "['a, lupdbinds] => 'a" (\_/[(_)]\ [1000,0] 900) + "_LUpdate" :: "['a, lupdbinds] => 'a" + (\(\open_block notation=\mixfix list update\\_/[(_)])\ [1000,0] 900) translations "_LUpdate xs (_lupdbinds b bs)" == "_LUpdate (_LUpdate xs b) bs" diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Main.thy --- a/src/HOL/Main.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Main.thy Tue Oct 08 12:10:35 2024 +0200 @@ -36,11 +36,11 @@ ordLeq3 (infix \\o\ 50) and ordLess2 (infix \ 50) and ordIso2 (infix \=o\ 50) and - card_of (\|_|\) and + card_of (\(\open_block notation=\mixfix card_of\\|_|)\) and BNF_Cardinal_Arithmetic.csum (infixr \+c\ 65) and BNF_Cardinal_Arithmetic.cprod (infixr \*c\ 80) and BNF_Cardinal_Arithmetic.cexp (infixr \^c\ 90) and - BNF_Def.convol (\\(_,/ _)\\) + BNF_Def.convol (\(\indent=1 notation=\mixfix convol\\\_,/ _\)\) bundle cardinal_syntax begin @@ -50,7 +50,7 @@ ordLeq3 (infix \\o\ 50) and ordLess2 (infix \ 50) and ordIso2 (infix \=o\ 50) and - card_of (\|_|\) and + card_of (\(\open_block notation=\mixfix card_of\\|_|)\) and BNF_Cardinal_Arithmetic.csum (infixr \+c\ 65) and BNF_Cardinal_Arithmetic.cprod (infixr \*c\ 80) and BNF_Cardinal_Arithmetic.cexp (infixr \^c\ 90) @@ -73,8 +73,8 @@ top (\\\) and inf (infixl \\\ 70) and sup (infixl \\\ 65) and - Inf (\\ _\ [900] 900) and - Sup (\\ _\ [900] 900) + Inf (\(\open_block notation=\prefix \\\\ _)\ [900] 900) and + Sup (\(\open_block notation=\prefix \\\\ _)\ [900] 900) syntax "_INF1" :: "pttrns \ 'b \ 'b" (\(\indent=3 notation=\binder \\\\_./ _)\ [0, 10] 10) diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Map.thy --- a/src/HOL/Map.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Map.thy Tue Oct 08 12:10:35 2024 +0200 @@ -57,15 +57,15 @@ nonterminal maplet and maplets syntax - "_maplet" :: "['a, 'a] \ maplet" (\_ /\/ _\) - "" :: "maplet \ updbind" (\_\) - "" :: "maplet \ maplets" (\_\) - "_Maplets" :: "[maplet, maplets] \ maplets" (\_,/ _\) - "_Map" :: "maplets \ 'a \ 'b" (\(\indent=1 notation=\mixfix maplets\\[_])\) + "_maplet" :: "['a, 'a] \ maplet" (\(\open_block notation=\mixfix maplet\\_ /\/ _)\) + "" :: "maplet \ updbind" (\_\) + "" :: "maplet \ maplets" (\_\) + "_Maplets" :: "[maplet, maplets] \ maplets" (\_,/ _\) + "_Map" :: "maplets \ 'a \ 'b" (\(\indent=1 notation=\mixfix map\\[_])\) (* Syntax forbids \[\, x := y, \]\ by introducing \maplets\ in addition to \updbinds\ *) syntax (ASCII) - "_maplet" :: "['a, 'a] \ maplet" (\_ /|->/ _\) + "_maplet" :: "['a, 'a] \ maplet" (\(\open_block notation=\mixfix maplet\\_ /|->/ _)\) syntax_consts "_maplet" "_Maplets" "_Map" \ fun_upd @@ -97,10 +97,10 @@ text \There is also the more specialized update syntax \xs [\] ys\ for lists \xs\ and \ys\.\ syntax - "_maplets" :: "['a, 'a] \ maplet" (\_ /[\]/ _\) + "_maplets" :: "['a, 'a] \ maplet" (\(\open_block notation=\mixfix maplet\\_ /[\]/ _)\) syntax (ASCII) - "_maplets" :: "['a, 'a] \ maplet" (\_ /[|->]/ _\) + "_maplets" :: "['a, 'a] \ maplet" (\(\open_block notation=\mixfix maplet\\_ /[|->]/ _)\) syntax_consts "_maplets" \ map_upds diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Nominal/Examples/Fsub.thy --- a/src/HOL/Nominal/Examples/Fsub.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Nominal/Examples/Fsub.thy Tue Oct 08 12:10:35 2024 +0200 @@ -17,7 +17,7 @@ section \Types for Names, Nominal Datatype Declaration for Types and Terms\ no_syntax - "_Map" :: "maplets => 'a \ 'b" (\(\indent=1 notation=\mixfix maplets\\[_])\) + "_Map" :: "maplets => 'a \ 'b" (\(\indent=1 notation=\mixfix map\\[_])\) text \The main point of this solution is to use names everywhere (be they bound, binding or free). In System \FSUB{} there are two kinds of names corresponding to diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Nominal/Examples/Pattern.thy --- a/src/HOL/Nominal/Examples/Pattern.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Nominal/Examples/Pattern.thy Tue Oct 08 12:10:35 2024 +0200 @@ -5,7 +5,7 @@ begin no_syntax - "_Map" :: "maplets => 'a \ 'b" (\(\indent=1 notation=\mixfix maplets\\[_])\) + "_Map" :: "maplets => 'a \ 'b" (\(\indent=1 notation=\mixfix map\\[_])\) atom_decl name diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Product_Type.thy --- a/src/HOL/Product_Type.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Product_Type.thy Tue Oct 08 12:10:35 2024 +0200 @@ -289,10 +289,10 @@ "_tuple" :: "'a \ tuple_args \ 'a \ 'b" (\(\indent=1 notation=\mixfix tuple\\'(_,/ _'))\) "_tuple_arg" :: "'a \ tuple_args" (\_\) "_tuple_args" :: "'a \ tuple_args \ tuple_args" (\_,/ _\) - "_pattern" :: "pttrn \ patterns \ pttrn" (\'(_,/ _')\) + "_pattern" :: "pttrn \ patterns \ pttrn" (\(\open_block notation=\pattern tuple\\'(_,/ _'))\) "" :: "pttrn \ patterns" (\_\) "_patterns" :: "pttrn \ patterns \ patterns" (\_,/ _\) - "_unit" :: pttrn (\'(')\) + "_unit" :: pttrn (\(\open_block notation=\pattern unit\\'('))\) syntax_consts "_pattern" "_patterns" \ case_prod and "_unit" \ case_unit diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Record.thy --- a/src/HOL/Record.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Record.thy Tue Oct 08 12:10:35 2024 +0200 @@ -430,25 +430,25 @@ "" :: "field_type => field_types" (\_\) "_field_types" :: "field_type => field_types => field_types" (\_,/ _\) "_record_type" :: "field_types => type" (\(\indent=3 notation=\mixfix record type\\\_\)\) - "_record_type_scheme" :: "field_types => type => type" (\(\indent=3 notation=\mixfix record type\\\_,/ (2\ ::/ _)\)\) + "_record_type_scheme" :: "field_types => type => type" (\(\indent=3 notation=\mixfix record type\\\_,/ (\indent=2 notation=\infix more type\\\ ::/ _)\)\) "_field" :: "ident => 'a => field" (\(\indent=2 notation=\infix field value\\_ =/ _)\) "" :: "field => fields" (\_\) "_fields" :: "field => fields => fields" (\_,/ _\) "_record" :: "fields => 'a" (\(\indent=3 notation=\mixfix record value\\\_\)\) - "_record_scheme" :: "fields => 'a => 'a" (\(\indent=3 notation=\mixfix record value\\\_,/ (2\ =/ _)\)\) + "_record_scheme" :: "fields => 'a => 'a" (\(\indent=3 notation=\mixfix record value\\\_,/ (\indent=2 notation=\infix more value\\\ =/ _)\)\) "_field_update" :: "ident => 'a => field_update" (\(\indent=2 notation=\infix field update\\_ :=/ _)\) "" :: "field_update => field_updates" (\_\) "_field_updates" :: "field_update => field_updates => field_updates" (\_,/ _\) - "_record_update" :: "'a => field_updates => 'b" (\_/(\indent=3 notation=\mixfix record update\\\_\)\ [900, 0] 900) + "_record_update" :: "'a => field_updates => 'b" (\(\open_block notation=\mixfix record update\\_/(3\_\))\ [900, 0] 900) syntax (ASCII) "_record_type" :: "field_types => type" (\(\indent=3 notation=\mixfix record type\\'(| _ |'))\) - "_record_type_scheme" :: "field_types => type => type" (\(\indent=3 notation=\mixfix record type\\'(| _,/ (2... ::/ _) |'))\) + "_record_type_scheme" :: "field_types => type => type" (\(\indent=3 notation=\mixfix record type\\'(| _,/ (\indent=2 notation=\infix more type\\... ::/ _) |'))\) "_record" :: "fields => 'a" (\(\indent=3 notation=\mixfix record value\\'(| _ |'))\) - "_record_scheme" :: "fields => 'a => 'a" (\(\indent=3 notation=\mixfix record value\\'(| _,/ (2... =/ _) |'))\) - "_record_update" :: "'a => field_updates => 'b" (\_/(\indent=3 notation=\mixfix record update\\'(| _ |'))\ [900, 0] 900) + "_record_scheme" :: "fields => 'a => 'a" (\(\indent=3 notation=\mixfix record value\\'(| _,/ (\indent=2 notation=\infix more value\\... =/ _) |'))\) + "_record_update" :: "'a => field_updates => 'b" (\(\open_block notation=\mixfix record update\\_/(3'(| _ |')))\ [900, 0] 900) subsection \Record package\ diff -r 6ce0c8d59f5a -r ec121999a9cb src/HOL/Typerep.thy --- a/src/HOL/Typerep.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/HOL/Typerep.thy Tue Oct 08 12:10:35 2024 +0200 @@ -18,7 +18,7 @@ end syntax - "_TYPEREP" :: "type => logic" (\(\indent=1 notation=\prefix TYPEREP\\TYPEREP/(1'(_')))\) + "_TYPEREP" :: "type => logic" (\(\indent=1 notation=\mixfix TYPEREP\\TYPEREP/(1'(_')))\) syntax_consts "_TYPEREP" \ typerep diff -r 6ce0c8d59f5a -r ec121999a9cb src/Pure/PIDE/markup_kind.ML --- a/src/Pure/PIDE/markup_kind.ML Sun Oct 06 22:56:07 2024 +0200 +++ b/src/Pure/PIDE/markup_kind.ML Tue Oct 08 12:10:35 2024 +0200 @@ -22,6 +22,7 @@ val markup_postfix: Markup.T val markup_infix: Markup.T val markup_binder: Markup.T + val markup_pattern: Markup.T val markup_type_literal: Markup.T val markup_literal: Markup.T val markup_type_application: Markup.T @@ -102,6 +103,7 @@ val markup_postfix = setup_notation (Binding.make ("postfix", \<^here>)); val markup_infix = setup_notation (Binding.make ("infix", \<^here>)); val markup_binder = setup_notation (Binding.make ("binder", \<^here>)); +val markup_pattern = setup_notation (Binding.make ("pattern", \<^here>)); val markup_type_literal = setup_notation (Binding.make ("type_literal", \<^here>)); val markup_literal = setup_notation (Binding.make ("literal", \<^here>)); diff -r 6ce0c8d59f5a -r ec121999a9cb src/Pure/pure_thy.ML --- a/src/Pure/pure_thy.ML Sun Oct 06 22:56:07 2024 +0200 +++ b/src/Pure/pure_thy.ML Tue Oct 08 12:10:35 2024 +0200 @@ -153,14 +153,16 @@ ("", typ "var_position \ aprop", Mixfix.mixfix "_"), ("_DDDOT", typ "aprop", Mixfix.mixfix "\"), ("_aprop", typ "aprop \ prop", - Mixfix.mixfix "(\open_block notation=\mixfix atomic prop\\PROP _)"), + Mixfix.mixfix "(\open_block notation=\prefix PROP\\PROP _)"), ("_asm", typ "prop \ asms", Mixfix.mixfix "_"), ("_asms", typ "prop \ asms \ asms", Mixfix.mixfix "_;/ _"), ("_bigimpl", typ "asms \ prop \ prop", mixfix ("(\notation=\infix \\\(1\_\)/ \ _)", [0, 1], 1)), - ("_ofclass", typ "type \ logic \ prop", Mixfix.mixfix "(1OFCLASS/(1'(_,/ _')))"), + ("_ofclass", typ "type \ logic \ prop", + Mixfix.mixfix "(\indent=1 notation=\mixfix OFCLASS\\OFCLASS/(1'(_,/ _')))"), ("_mk_ofclass", typ "dummy", NoSyn), - ("_TYPE", typ "type \ logic", Mixfix.mixfix "(1TYPE/(1'(_')))"), + ("_TYPE", typ "type \ logic", + Mixfix.mixfix "(\indent=1 notation=\mixfix TYPE\\TYPE/(1'(_')))"), ("", typ "id_position \ logic", Mixfix.mixfix "_"), ("", typ "longid_position \ logic", Mixfix.mixfix "_"), ("", typ "var_position \ logic", Mixfix.mixfix "_"), @@ -185,17 +187,27 @@ ("_position", typ "string_token \ string_position", Mixfix.mixfix "_"), ("_position", typ "cartouche \ cartouche_position", Mixfix.mixfix "_"), ("_type_constraint_", typ "'a", NoSyn), - ("_context_const", typ "id_position \ logic", Mixfix.mixfix "CONST _"), - ("_context_const", typ "id_position \ aprop", Mixfix.mixfix "CONST _"), - ("_context_const", typ "longid_position \ logic", Mixfix.mixfix "CONST _"), - ("_context_const", typ "longid_position \ aprop", Mixfix.mixfix "CONST _"), - ("_context_xconst", typ "id_position \ logic", Mixfix.mixfix "XCONST _"), - ("_context_xconst", typ "id_position \ aprop", Mixfix.mixfix "XCONST _"), - ("_context_xconst", typ "longid_position \ logic", Mixfix.mixfix "XCONST _"), - ("_context_xconst", typ "longid_position \ aprop", Mixfix.mixfix "XCONST _"), + ("_context_const", typ "id_position \ logic", + Mixfix.mixfix "(\open_block notation=\prefix CONST\\CONST _)"), + ("_context_const", typ "id_position \ aprop", + Mixfix.mixfix "(\open_block notation=\prefix CONST\\CONST _)"), + ("_context_const", typ "longid_position \ logic", + Mixfix.mixfix "(\open_block notation=\prefix CONST\\CONST _)"), + ("_context_const", typ "longid_position \ aprop", + Mixfix.mixfix "(\open_block notation=\prefix CONST\\CONST _)"), + ("_context_xconst", typ "id_position \ logic", + Mixfix.mixfix "(\open_block notation=\prefix XCONST\\XCONST _)"), + ("_context_xconst", typ "id_position \ aprop", + Mixfix.mixfix "(\open_block notation=\prefix XCONST\\XCONST _)"), + ("_context_xconst", typ "longid_position \ logic", + Mixfix.mixfix "(\open_block notation=\prefix XCONST\\XCONST _)"), + ("_context_xconst", typ "longid_position \ aprop", + Mixfix.mixfix "(\open_block notation=\prefix XCONST\\XCONST _)"), (const "Pure.dummy_pattern", typ "aprop", Mixfix.mixfix "'_"), - ("_sort_constraint", typ "type \ prop", Mixfix.mixfix "(1SORT'_CONSTRAINT/(1'(_')))"), - (const "Pure.term", typ "logic \ prop", Mixfix.mixfix "TERM _"), + ("_sort_constraint", typ "type \ prop", + Mixfix.mixfix "(\indent=1 notation=\mixfix SORT_CONSTRAINT\\SORT'_CONSTRAINT/(1'(_')))"), + (const "Pure.term", typ "logic \ prop", + Mixfix.mixfix "(\open_block notation=\prefix TERM\\TERM _)"), (const "Pure.conjunction", typ "prop \ prop \ prop", infixr_ ("&&&", 2))] #> Sign.syntax_global true Syntax.mode_default applC_syntax #> Sign.syntax_global true (Print_Mode.ASCII, true) diff -r 6ce0c8d59f5a -r ec121999a9cb src/Sequents/ILL.thy --- a/src/Sequents/ILL.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/Sequents/ILL.thy Tue Oct 08 12:10:35 2024 +0200 @@ -48,7 +48,7 @@ definition liff :: "[o, o] \ o" (infixr \o-o\ 45) where "P o-o Q == (P -o Q) >< (Q -o P)" -definition aneg :: "o\o" (\~_\) +definition aneg :: "o\o" (\(\open_block notation=\prefix ~\\~_)\) where "~A == A -o 0" diff -r 6ce0c8d59f5a -r ec121999a9cb src/Sequents/LK0.thy --- a/src/Sequents/LK0.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/Sequents/LK0.thy Tue Oct 08 12:10:35 2024 +0200 @@ -24,7 +24,7 @@ True :: o False :: o equal :: "['a,'a] \ o" (infixl \=\ 50) - Not :: "o \ o" (\\ _\ [40] 40) + Not :: "o \ o" (\(\open_block notation=\prefix \\\\ _)\ [40] 40) conj :: "[o,o] \ o" (infixr \\\ 35) disj :: "[o,o] \ o" (infixr \\\ 30) imp :: "[o,o] \ o" (infixr \\\ 25) diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/Cardinal.thy --- a/src/ZF/Cardinal.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/Cardinal.thy Tue Oct 08 12:10:35 2024 +0200 @@ -25,8 +25,8 @@ "A \ B \ A \ B \ \(A \ B)" definition - cardinal :: "i\i" (\|_|\) where - "|A| \ (\ i. i \ A)" + cardinal :: "i\i" (\(\open_block notation=\mixfix cardinal\\|_|)\) + where "|A| \ (\ i. i \ A)" definition Finite :: "i\o" where diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/Constructible/Normal.thy --- a/src/ZF/Constructible/Normal.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/Constructible/Normal.thy Tue Oct 08 12:10:35 2024 +0200 @@ -463,7 +463,7 @@ numbers.\ definition - Aleph :: "i \ i" (\\_\ [90] 90) where + Aleph :: "i \ i" (\(\open_block notation=\prefix \\\\_)\ [90] 90) where "Aleph(a) \ transrec2(a, nat, \x r. csucc(r))" lemma Card_Aleph [simp, intro]: diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/Induct/Multiset.thy --- a/src/ZF/Induct/Multiset.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/Induct/Multiset.thy Tue Oct 08 12:10:35 2024 +0200 @@ -53,7 +53,7 @@ definition (* set of elements of a multiset *) - msingle :: "i \ i" (\{#_#}\) where + msingle :: "i \ i" (\(\open_block notation=\mixfix multiset\\{#_#})\) where "{#a#} \ {\a, 1\}" definition diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/Int.thy --- a/src/ZF/Int.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/Int.thy Tue Oct 08 12:10:35 2024 +0200 @@ -17,8 +17,8 @@ "int \ (nat*nat)//intrel" definition - int_of :: "i\i" \ \coercion from nat to int\ (\$# _\ [80] 80) where - "$# m \ intrel `` {}" + int_of :: "i\i" \ \coercion from nat to int\ (\(\open_block notation=\prefix $#\\$# _)\ [80] 80) + where "$# m \ intrel `` {}" definition intify :: "i\i" \ \coercion from ANYTHING to int\ where @@ -29,8 +29,8 @@ "raw_zminus(z) \ \\x,y\\z. intrel``{\y,x\}" definition - zminus :: "i\i" (\$- _\ [80] 80) where - "$- z \ raw_zminus (intify(z))" + zminus :: "i\i" (\(\open_block notation=\prefix $-\\$- _)\ [80] 80) + where "$- z \ raw_zminus (intify(z))" definition znegative :: "i\o" where diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/OrdQuant.thy --- a/src/ZF/OrdQuant.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/OrdQuant.thy Tue Oct 08 12:10:35 2024 +0200 @@ -330,7 +330,7 @@ subsubsection\Sets as Classes\ definition - setclass :: "[i,i] \ o" (\##_\ [40] 40) where + setclass :: "[i,i] \ o" (\(\open_block notation=\prefix setclass\\##_)\ [40] 40) where "setclass(A) \ \x. x \ A" lemma setclass_iff [simp]: "setclass(A,x) <-> x \ A" diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/QPair.thy --- a/src/ZF/QPair.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/QPair.thy Tue Oct 08 12:10:35 2024 +0200 @@ -21,8 +21,8 @@ \ definition - QPair :: "[i, i] \ i" (\<(_;/ _)>\) where - " \ a+b" + QPair :: "[i, i] \ i" (\(\indent=1 notation=\mixfix Quine pair\\<_;/ _>)\) + where " \ a+b" definition qfst :: "i \ i" where diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/Trancl.thy --- a/src/ZF/Trancl.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/Trancl.thy Tue Oct 08 12:10:35 2024 +0200 @@ -32,7 +32,7 @@ "trans(r) \ \x y z. \x,y\: r \ \y,z\: r \ \x,z\: r" definition - trans_on :: "[i,i]\o" (\trans[_]'(_')\) where + trans_on :: "[i,i]\o" (\(\open_block notation=\mixfix trans_on\\trans[_]'(_'))\) where "trans[A](r) \ \x\A. \y\A. \z\A. \x,y\: r \ \y,z\: r \ \x,z\: r" diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/UNITY/Increasing.thy --- a/src/ZF/UNITY/Increasing.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/UNITY/Increasing.thy Tue Oct 08 12:10:35 2024 +0200 @@ -11,13 +11,15 @@ theory Increasing imports Constrains Monotonicity begin definition - increasing :: "[i, i, i\i] \ i" (\increasing[_]'(_, _')\) where + increasing :: "[i, i, i\i] \ i" (\(\open_block notation=\mixfix increasing\\increasing[_]'(_, _'))\) + where "increasing[A](r, f) \ {F \ program. (\k \ A. F \ stable({s \ state. \ r})) \ (\x \ state. f(x):A)}" definition - Increasing :: "[i, i, i\i] \ i" (\Increasing[_]'(_, _')\) where + Increasing :: "[i, i, i\i] \ i" (\(\open_block notation=\mixfix Increasing\\Increasing[_]'(_, _'))\) + where "Increasing[A](r, f) \ {F \ program. (\k \ A. F \ Stable({s \ state. \ r})) \ (\x \ state. f(x):A)}" diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/WF.thy --- a/src/ZF/WF.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/WF.thy Tue Oct 08 12:10:35 2024 +0200 @@ -24,7 +24,7 @@ "wf(r) \ \Z. Z=0 | (\x\Z. \y. \y,x\:r \ \ y \ Z)" definition - wf_on :: "[i,i]\o" (\wf[_]'(_')\) where + wf_on :: "[i,i]\o" (\(\open_block notation=\mixfix wf_on\\wf[_]'(_'))\) where (*r is well-founded on A*) "wf_on(A,r) \ wf(r \ A*A)" @@ -46,8 +46,8 @@ "wfrec(r,a,H) \ wftrec(r^+, a, \x f. H(x, restrict(f,r-``{x})))" definition - wfrec_on :: "[i, i, i, [i,i]\i] \i" (\wfrec[_]'(_,_,_')\) where - "wfrec[A](r,a,H) \ wfrec(r \ A*A, a, H)" + wfrec_on :: "[i, i, i, [i,i]\i] \i" (\(\open_block notation=\mixfix wfrec_on\\wfrec[_]'(_,_,_'))\) + where "wfrec[A](r,a,H) \ wfrec(r \ A*A, a, H)" subsection\Well-Founded Relations\ diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/ZF_Base.thy --- a/src/ZF/ZF_Base.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/ZF_Base.thy Tue Oct 08 12:10:35 2024 +0200 @@ -20,7 +20,7 @@ and zero :: "i" (\0\) \ \the empty set\ and Pow :: "i \ i" \ \power sets\ and Inf :: "i" \ \infinite set\ - and Union :: "i \ i" (\\_\ [90] 90) + and Union :: "i \ i" (\(\open_block notation=\prefix \\\\_)\ [90] 90) and PrimReplace :: "[i, [i, i] \ o] \ i" abbreviation not_mem :: "[i, i] \ o" (infixl \\\ 50) \ \negated membership relation\ @@ -83,7 +83,7 @@ subsection \General union and intersection\ -definition Inter :: "i \ i" (\\_\ [90] 90) +definition Inter :: "i \ i" (\(\open_block notation=\prefix \\\\_)\ [90] 90) where "\(A) \ { x\\(A) . \y\A. x\y}" syntax @@ -196,8 +196,8 @@ (* Patterns -- extends pre-defined type "pttrn" used in abstractions *) nonterminal patterns syntax - "_pattern" :: "patterns \ pttrn" (\\_\\) - "" :: "pttrn \ patterns" (\_\) + "_pattern" :: "patterns \ pttrn" (\(\open_block notation=\pattern tuple\\\_\)\) + "" :: "pttrn \ patterns" (\_\) "_patterns" :: "[pttrn, patterns] \ patterns" (\_,/_\) syntax_consts "_pattern" "_patterns" == split @@ -297,7 +297,7 @@ "_PROD" :: "[pttrn, i, i] \ i" (\(\indent=3 notation=\binder PROD:\\PROD _:_./ _)\ 10) "_SUM" :: "[pttrn, i, i] \ i" (\(\indent=3 notation=\binder SUM:\\SUM _:_./ _)\ 10) "_lam" :: "[pttrn, i, i] \ i" (\(\indent=3 notation=\binder lam:\\lam _:_./ _)\ 10) - "_Tuple" :: "[i, tuple_args] \ i" (\<(_,/ _)>\) + "_Tuple" :: "[i, tuple_args] \ i" (\(\indent=1 notation=\mixfix tuple enumeration\\<_,/ _>)\) "_pattern" :: "patterns \ pttrn" (\<_>\) diff -r 6ce0c8d59f5a -r ec121999a9cb src/ZF/func.thy --- a/src/ZF/func.thy Sun Oct 06 22:56:07 2024 +0200 +++ b/src/ZF/func.thy Tue Oct 08 12:10:35 2024 +0200 @@ -448,10 +448,10 @@ nonterminal updbinds and updbind syntax - "_updbind" :: "[i, i] \ updbind" (\(\indent=2 notation=\infix update\\_ :=/ _)\) - "" :: "updbind \ updbinds" (\_\) - "_updbinds" :: "[updbind, updbinds] \ updbinds" (\_,/ _\) - "_Update" :: "[i, updbinds] \ i" (\_/'((_)')\ [900,0] 900) + "_updbind" :: "[i, i] \ updbind" (\(\indent=2 notation=\infix update\\_ :=/ _)\) + "" :: "updbind \ updbinds" (\_\) + "_updbinds" :: "[updbind, updbinds] \ updbinds" (\_,/ _\) + "_Update" :: "[i, updbinds] \ i" (\(\open_block notation=\mixfix function update\\_/'((_)'))\ [900,0] 900) translations "_Update (f, _updbinds(b,bs))" == "_Update (_Update(f,b), bs)" "f(x:=y)" == "CONST update(f,x,y)"