src/Pure/Isar/isar_syn.ML
changeset 36953 2af1ad9aa1a3
parent 36952 338c3f8229e4
child 37198 3af985b10550
     1.1 --- a/src/Pure/Isar/isar_syn.ML	Sat May 15 23:32:15 2010 +0200
     1.2 +++ b/src/Pure/Isar/isar_syn.ML	Sat May 15 23:40:00 2010 +0200
     1.3 @@ -27,52 +27,52 @@
     1.4  (** init and exit **)
     1.5  
     1.6  val _ =
     1.7 -  OuterSyntax.command "theory" "begin theory" (Keyword.tag_theory Keyword.thy_begin)
     1.8 +  Outer_Syntax.command "theory" "begin theory" (Keyword.tag_theory Keyword.thy_begin)
     1.9      (Thy_Header.args >> (Toplevel.print oo IsarCmd.init_theory));
    1.10  
    1.11  val _ =
    1.12 -  OuterSyntax.command "end" "end (local) theory" (Keyword.tag_theory Keyword.thy_end)
    1.13 +  Outer_Syntax.command "end" "end (local) theory" (Keyword.tag_theory Keyword.thy_end)
    1.14      (Scan.succeed (Toplevel.exit o Toplevel.end_local_theory));
    1.15  
    1.16  
    1.17  
    1.18  (** markup commands **)
    1.19  
    1.20 -val _ = OuterSyntax.markup_command ThyOutput.Markup "header" "theory header" Keyword.diag
    1.21 +val _ = Outer_Syntax.markup_command ThyOutput.Markup "header" "theory header" Keyword.diag
    1.22    (Parse.doc_source >> IsarCmd.header_markup);
    1.23  
    1.24 -val _ = OuterSyntax.markup_command ThyOutput.Markup "chapter" "chapter heading"
    1.25 +val _ = Outer_Syntax.markup_command ThyOutput.Markup "chapter" "chapter heading"
    1.26    Keyword.thy_heading (Parse.opt_target -- Parse.doc_source >> IsarCmd.local_theory_markup);
    1.27  
    1.28 -val _ = OuterSyntax.markup_command ThyOutput.Markup "section" "section heading"
    1.29 +val _ = Outer_Syntax.markup_command ThyOutput.Markup "section" "section heading"
    1.30    Keyword.thy_heading (Parse.opt_target -- Parse.doc_source >> IsarCmd.local_theory_markup);
    1.31  
    1.32 -val _ = OuterSyntax.markup_command ThyOutput.Markup "subsection" "subsection heading"
    1.33 +val _ = Outer_Syntax.markup_command ThyOutput.Markup "subsection" "subsection heading"
    1.34    Keyword.thy_heading (Parse.opt_target -- Parse.doc_source >> IsarCmd.local_theory_markup);
    1.35  
    1.36  val _ =
    1.37 -  OuterSyntax.markup_command ThyOutput.Markup "subsubsection" "subsubsection heading"
    1.38 +  Outer_Syntax.markup_command ThyOutput.Markup "subsubsection" "subsubsection heading"
    1.39    Keyword.thy_heading (Parse.opt_target -- Parse.doc_source >> IsarCmd.local_theory_markup);
    1.40  
    1.41 -val _ = OuterSyntax.markup_command ThyOutput.MarkupEnv "text" "formal comment (theory)"
    1.42 +val _ = Outer_Syntax.markup_command ThyOutput.MarkupEnv "text" "formal comment (theory)"
    1.43    Keyword.thy_decl (Parse.opt_target -- Parse.doc_source >> IsarCmd.local_theory_markup);
    1.44  
    1.45 -val _ = OuterSyntax.markup_command ThyOutput.Verbatim "text_raw" "raw document preparation text"
    1.46 +val _ = Outer_Syntax.markup_command ThyOutput.Verbatim "text_raw" "raw document preparation text"
    1.47    Keyword.thy_decl (Parse.opt_target -- Parse.doc_source >> IsarCmd.local_theory_markup);
    1.48  
    1.49 -val _ = OuterSyntax.markup_command ThyOutput.Markup "sect" "formal comment (proof)"
    1.50 +val _ = Outer_Syntax.markup_command ThyOutput.Markup "sect" "formal comment (proof)"
    1.51    (Keyword.tag_proof Keyword.prf_heading) (Parse.doc_source >> IsarCmd.proof_markup);
    1.52  
    1.53 -val _ = OuterSyntax.markup_command ThyOutput.Markup "subsect" "formal comment (proof)"
    1.54 +val _ = Outer_Syntax.markup_command ThyOutput.Markup "subsect" "formal comment (proof)"
    1.55    (Keyword.tag_proof Keyword.prf_heading) (Parse.doc_source >> IsarCmd.proof_markup);
    1.56  
    1.57 -val _ = OuterSyntax.markup_command ThyOutput.Markup "subsubsect" "formal comment (proof)"
    1.58 +val _ = Outer_Syntax.markup_command ThyOutput.Markup "subsubsect" "formal comment (proof)"
    1.59    (Keyword.tag_proof Keyword.prf_heading) (Parse.doc_source >> IsarCmd.proof_markup);
    1.60  
    1.61 -val _ = OuterSyntax.markup_command ThyOutput.MarkupEnv "txt" "formal comment (proof)"
    1.62 +val _ = Outer_Syntax.markup_command ThyOutput.MarkupEnv "txt" "formal comment (proof)"
    1.63    (Keyword.tag_proof Keyword.prf_decl) (Parse.doc_source >> IsarCmd.proof_markup);
    1.64  
    1.65 -val _ = OuterSyntax.markup_command ThyOutput.Verbatim "txt_raw"
    1.66 +val _ = Outer_Syntax.markup_command ThyOutput.Verbatim "txt_raw"
    1.67    "raw document preparation text (proof)" (Keyword.tag_proof Keyword.prf_decl)
    1.68    (Parse.doc_source >> IsarCmd.proof_markup);
    1.69  
    1.70 @@ -83,19 +83,19 @@
    1.71  (* classes and sorts *)
    1.72  
    1.73  val _ =
    1.74 -  OuterSyntax.command "classes" "declare type classes" Keyword.thy_decl
    1.75 +  Outer_Syntax.command "classes" "declare type classes" Keyword.thy_decl
    1.76      (Scan.repeat1 (Parse.binding -- Scan.optional ((Parse.$$$ "\\<subseteq>" || Parse.$$$ "<") |--
    1.77          Parse.!!! (Parse.list1 Parse.xname)) [])
    1.78        >> (Toplevel.theory o fold AxClass.axiomatize_class_cmd));
    1.79  
    1.80  val _ =
    1.81 -  OuterSyntax.command "classrel" "state inclusion of type classes (axiomatic!)" Keyword.thy_decl
    1.82 +  Outer_Syntax.command "classrel" "state inclusion of type classes (axiomatic!)" Keyword.thy_decl
    1.83      (Parse.and_list1 (Parse.xname -- ((Parse.$$$ "\\<subseteq>" || Parse.$$$ "<")
    1.84          |-- Parse.!!! Parse.xname))
    1.85      >> (Toplevel.theory o AxClass.axiomatize_classrel_cmd));
    1.86  
    1.87  val _ =
    1.88 -  OuterSyntax.local_theory "default_sort" "declare default sort for explicit type variables"
    1.89 +  Outer_Syntax.local_theory "default_sort" "declare default sort for explicit type variables"
    1.90      Keyword.thy_decl
    1.91      (Parse.sort >> (fn s => fn lthy => Local_Theory.set_defsort (Syntax.read_sort lthy s) lthy));
    1.92  
    1.93 @@ -103,40 +103,40 @@
    1.94  (* types *)
    1.95  
    1.96  val _ =
    1.97 -  OuterSyntax.local_theory "typedecl" "type declaration" Keyword.thy_decl
    1.98 +  Outer_Syntax.local_theory "typedecl" "type declaration" Keyword.thy_decl
    1.99      (Parse.type_args -- Parse.binding -- Parse.opt_mixfix
   1.100        >> (fn ((args, a), mx) => Typedecl.typedecl (a, map (rpair dummyS) args, mx) #> snd));
   1.101  
   1.102  val _ =
   1.103 -  OuterSyntax.local_theory "types" "declare type abbreviations" Keyword.thy_decl
   1.104 +  Outer_Syntax.local_theory "types" "declare type abbreviations" Keyword.thy_decl
   1.105      (Scan.repeat1
   1.106        (Parse.type_args -- Parse.binding --
   1.107          (Parse.$$$ "=" |-- Parse.!!! (Parse.typ -- Parse.opt_mixfix')))
   1.108        >> (fold (fn ((args, a), (rhs, mx)) => snd o Typedecl.abbrev_cmd (a, args, mx) rhs)));
   1.109  
   1.110  val _ =
   1.111 -  OuterSyntax.command "nonterminals" "declare types treated as grammar nonterminal symbols"
   1.112 +  Outer_Syntax.command "nonterminals" "declare types treated as grammar nonterminal symbols"
   1.113      Keyword.thy_decl (Scan.repeat1 Parse.binding >> (Toplevel.theory o Sign.add_nonterminals));
   1.114  
   1.115  val _ =
   1.116 -  OuterSyntax.command "arities" "state type arities (axiomatic!)" Keyword.thy_decl
   1.117 +  Outer_Syntax.command "arities" "state type arities (axiomatic!)" Keyword.thy_decl
   1.118      (Scan.repeat1 Parse.arity >> (Toplevel.theory o fold AxClass.axiomatize_arity_cmd));
   1.119  
   1.120  
   1.121  (* consts and syntax *)
   1.122  
   1.123  val _ =
   1.124 -  OuterSyntax.command "judgment" "declare object-logic judgment" Keyword.thy_decl
   1.125 +  Outer_Syntax.command "judgment" "declare object-logic judgment" Keyword.thy_decl
   1.126      (Parse.const_binding >> (Toplevel.theory o Object_Logic.add_judgment_cmd));
   1.127  
   1.128  val _ =
   1.129 -  OuterSyntax.command "consts" "declare constants" Keyword.thy_decl
   1.130 +  Outer_Syntax.command "consts" "declare constants" Keyword.thy_decl
   1.131      (Scan.repeat1 Parse.const_binding >> (Toplevel.theory o Sign.add_consts));
   1.132  
   1.133  val opt_overloaded = Parse.opt_keyword "overloaded";
   1.134  
   1.135  val _ =
   1.136 -  OuterSyntax.command "finalconsts" "declare constants as final" Keyword.thy_decl
   1.137 +  Outer_Syntax.command "finalconsts" "declare constants as final" Keyword.thy_decl
   1.138      (opt_overloaded -- Scan.repeat1 Parse.term >> (uncurry (Toplevel.theory oo Theory.add_finals)));
   1.139  
   1.140  val mode_spec =
   1.141 @@ -147,11 +147,11 @@
   1.142    Scan.optional (Parse.$$$ "(" |-- Parse.!!! (mode_spec --| Parse.$$$ ")")) Syntax.mode_default;
   1.143  
   1.144  val _ =
   1.145 -  OuterSyntax.command "syntax" "declare syntactic constants" Keyword.thy_decl
   1.146 +  Outer_Syntax.command "syntax" "declare syntactic constants" Keyword.thy_decl
   1.147      (opt_mode -- Scan.repeat1 Parse.const >> (Toplevel.theory o uncurry Sign.add_modesyntax));
   1.148  
   1.149  val _ =
   1.150 -  OuterSyntax.command "no_syntax" "delete syntax declarations" Keyword.thy_decl
   1.151 +  Outer_Syntax.command "no_syntax" "delete syntax declarations" Keyword.thy_decl
   1.152      (opt_mode -- Scan.repeat1 Parse.const >> (Toplevel.theory o uncurry Sign.del_modesyntax));
   1.153  
   1.154  
   1.155 @@ -171,18 +171,18 @@
   1.156      >> (fn (left, (arr, right)) => arr (left, right));
   1.157  
   1.158  val _ =
   1.159 -  OuterSyntax.command "translations" "declare syntax translation rules" Keyword.thy_decl
   1.160 +  Outer_Syntax.command "translations" "declare syntax translation rules" Keyword.thy_decl
   1.161      (Scan.repeat1 trans_line >> (Toplevel.theory o Sign.add_trrules));
   1.162  
   1.163  val _ =
   1.164 -  OuterSyntax.command "no_translations" "remove syntax translation rules" Keyword.thy_decl
   1.165 +  Outer_Syntax.command "no_translations" "remove syntax translation rules" Keyword.thy_decl
   1.166      (Scan.repeat1 trans_line >> (Toplevel.theory o Sign.del_trrules));
   1.167  
   1.168  
   1.169  (* axioms and definitions *)
   1.170  
   1.171  val _ =
   1.172 -  OuterSyntax.command "axioms" "state arbitrary propositions (axiomatic!)" Keyword.thy_decl
   1.173 +  Outer_Syntax.command "axioms" "state arbitrary propositions (axiomatic!)" Keyword.thy_decl
   1.174      (Scan.repeat1 Parse_Spec.spec >>
   1.175        (Toplevel.theory o
   1.176          (IsarCmd.add_axioms o
   1.177 @@ -194,7 +194,7 @@
   1.178        Parse.$$$ "overloaded" >> K (false, true)) --| Parse.$$$ ")")) (false, false);
   1.179  
   1.180  val _ =
   1.181 -  OuterSyntax.command "defs" "define constants" Keyword.thy_decl
   1.182 +  Outer_Syntax.command "defs" "define constants" Keyword.thy_decl
   1.183      (opt_unchecked_overloaded --
   1.184        Scan.repeat1 (Parse_Spec.thm_name ":" -- Parse.prop >> (fn ((x, y), z) => ((x, z), y)))
   1.185        >> (Toplevel.theory o IsarCmd.add_defs));
   1.186 @@ -215,41 +215,41 @@
   1.187      |-- Parse.!!! (Parse.simple_fixes --| Parse.$$$ ")")) [];
   1.188  
   1.189  val _ =
   1.190 -  OuterSyntax.command "constdefs" "old-style constant definition" Keyword.thy_decl
   1.191 +  Outer_Syntax.command "constdefs" "old-style constant definition" Keyword.thy_decl
   1.192      (structs -- Scan.repeat1 old_constdef >> (Toplevel.theory o Constdefs.add_constdefs));
   1.193  
   1.194  
   1.195  (* constant definitions and abbreviations *)
   1.196  
   1.197  val _ =
   1.198 -  OuterSyntax.local_theory "definition" "constant definition" Keyword.thy_decl
   1.199 +  Outer_Syntax.local_theory "definition" "constant definition" Keyword.thy_decl
   1.200      (Parse_Spec.constdef >> (fn args => #2 o Specification.definition_cmd args));
   1.201  
   1.202  val _ =
   1.203 -  OuterSyntax.local_theory "abbreviation" "constant abbreviation" Keyword.thy_decl
   1.204 +  Outer_Syntax.local_theory "abbreviation" "constant abbreviation" Keyword.thy_decl
   1.205      (opt_mode -- (Scan.option Parse_Spec.constdecl -- Parse.prop)
   1.206        >> (fn (mode, args) => Specification.abbreviation_cmd mode args));
   1.207  
   1.208  val _ =
   1.209 -  OuterSyntax.local_theory "type_notation" "add concrete syntax for type constructors"
   1.210 +  Outer_Syntax.local_theory "type_notation" "add concrete syntax for type constructors"
   1.211      Keyword.thy_decl
   1.212      (opt_mode -- Parse.and_list1 (Parse.xname -- Parse.mixfix)
   1.213        >> (fn (mode, args) => Specification.type_notation_cmd true mode args));
   1.214  
   1.215  val _ =
   1.216 -  OuterSyntax.local_theory "no_type_notation" "delete concrete syntax for type constructors"
   1.217 +  Outer_Syntax.local_theory "no_type_notation" "delete concrete syntax for type constructors"
   1.218      Keyword.thy_decl
   1.219      (opt_mode -- Parse.and_list1 (Parse.xname -- Parse.mixfix)
   1.220        >> (fn (mode, args) => Specification.type_notation_cmd false mode args));
   1.221  
   1.222  val _ =
   1.223 -  OuterSyntax.local_theory "notation" "add concrete syntax for constants / fixed variables"
   1.224 +  Outer_Syntax.local_theory "notation" "add concrete syntax for constants / fixed variables"
   1.225      Keyword.thy_decl
   1.226      (opt_mode -- Parse.and_list1 (Parse.xname -- Parse_Spec.locale_mixfix)
   1.227        >> (fn (mode, args) => Specification.notation_cmd true mode args));
   1.228  
   1.229  val _ =
   1.230 -  OuterSyntax.local_theory "no_notation" "delete concrete syntax for constants / fixed variables"
   1.231 +  Outer_Syntax.local_theory "no_notation" "delete concrete syntax for constants / fixed variables"
   1.232      Keyword.thy_decl
   1.233      (opt_mode -- Parse.and_list1 (Parse.xname -- Parse_Spec.locale_mixfix)
   1.234        >> (fn (mode, args) => Specification.notation_cmd false mode args));
   1.235 @@ -258,7 +258,7 @@
   1.236  (* constant specifications *)
   1.237  
   1.238  val _ =
   1.239 -  OuterSyntax.command "axiomatization" "axiomatic constant specification" Keyword.thy_decl
   1.240 +  Outer_Syntax.command "axiomatization" "axiomatic constant specification" Keyword.thy_decl
   1.241      (Scan.optional Parse.fixes [] --
   1.242        Scan.optional (Parse.where_ |-- Parse.!!! (Parse.and_list1 Parse_Spec.specs)) []
   1.243        >> (fn (x, y) => Toplevel.theory (#2 o Specification.axiomatization_cmd x y)));
   1.244 @@ -270,13 +270,13 @@
   1.245    Parse_Spec.name_facts >> (fn args => #2 o Specification.theorems_cmd kind args);
   1.246  
   1.247  val _ =
   1.248 -  OuterSyntax.local_theory "theorems" "define theorems" Keyword.thy_decl (theorems Thm.theoremK);
   1.249 +  Outer_Syntax.local_theory "theorems" "define theorems" Keyword.thy_decl (theorems Thm.theoremK);
   1.250  
   1.251  val _ =
   1.252 -  OuterSyntax.local_theory "lemmas" "define lemmas" Keyword.thy_decl (theorems Thm.lemmaK);
   1.253 +  Outer_Syntax.local_theory "lemmas" "define lemmas" Keyword.thy_decl (theorems Thm.lemmaK);
   1.254  
   1.255  val _ =
   1.256 -  OuterSyntax.local_theory "declare" "declare theorems" Keyword.thy_decl
   1.257 +  Outer_Syntax.local_theory "declare" "declare theorems" Keyword.thy_decl
   1.258      (Parse.and_list1 Parse_Spec.xthms1
   1.259        >> (fn args => #2 o Specification.theorems_cmd "" [(Attrib.empty_binding, flat args)]));
   1.260  
   1.261 @@ -284,15 +284,15 @@
   1.262  (* name space entry path *)
   1.263  
   1.264  val _ =
   1.265 -  OuterSyntax.command "global" "disable prefixing of theory name" Keyword.thy_decl
   1.266 +  Outer_Syntax.command "global" "disable prefixing of theory name" Keyword.thy_decl
   1.267      (Scan.succeed (Toplevel.theory Sign.root_path));
   1.268  
   1.269  val _ =
   1.270 -  OuterSyntax.command "local" "enable prefixing of theory name" Keyword.thy_decl
   1.271 +  Outer_Syntax.command "local" "enable prefixing of theory name" Keyword.thy_decl
   1.272      (Scan.succeed (Toplevel.theory Sign.local_path));
   1.273  
   1.274  fun hide_names name hide what =
   1.275 -  OuterSyntax.command name ("hide " ^ what ^ " from name space") Keyword.thy_decl
   1.276 +  Outer_Syntax.command name ("hide " ^ what ^ " from name space") Keyword.thy_decl
   1.277      ((Parse.opt_keyword "open" >> not) -- Scan.repeat1 Parse.xname >>
   1.278        (Toplevel.theory o uncurry hide));
   1.279  
   1.280 @@ -312,55 +312,55 @@
   1.281    (Context.proof_map (ML_Env.inherit (Context.Proof (Proof.context_of prf)))) prf;
   1.282  
   1.283  val _ =
   1.284 -  OuterSyntax.command "use" "ML text from file" (Keyword.tag_ml Keyword.thy_decl)
   1.285 +  Outer_Syntax.command "use" "ML text from file" (Keyword.tag_ml Keyword.thy_decl)
   1.286      (Parse.path >>
   1.287        (fn path => Toplevel.generic_theory (ThyInfo.exec_file false path #> propagate_env)));
   1.288  
   1.289  val _ =
   1.290 -  OuterSyntax.command "ML" "ML text within theory or local theory"
   1.291 +  Outer_Syntax.command "ML" "ML text within theory or local theory"
   1.292      (Keyword.tag_ml Keyword.thy_decl)
   1.293      (Parse.ML_source >> (fn (txt, pos) =>
   1.294        Toplevel.generic_theory
   1.295          (ML_Context.exec (fn () => ML_Context.eval true pos txt) #> propagate_env)));
   1.296  
   1.297  val _ =
   1.298 -  OuterSyntax.command "ML_prf" "ML text within proof" (Keyword.tag_proof Keyword.prf_decl)
   1.299 +  Outer_Syntax.command "ML_prf" "ML text within proof" (Keyword.tag_proof Keyword.prf_decl)
   1.300      (Parse.ML_source >> (fn (txt, pos) =>
   1.301        Toplevel.proof (Proof.map_context (Context.proof_map
   1.302          (ML_Context.exec (fn () => ML_Context.eval true pos txt))) #> propagate_env_prf)));
   1.303  
   1.304  val _ =
   1.305 -  OuterSyntax.command "ML_val" "diagnostic ML text" (Keyword.tag_ml Keyword.diag)
   1.306 +  Outer_Syntax.command "ML_val" "diagnostic ML text" (Keyword.tag_ml Keyword.diag)
   1.307      (Parse.ML_source >> IsarCmd.ml_diag true);
   1.308  
   1.309  val _ =
   1.310 -  OuterSyntax.command "ML_command" "diagnostic ML text (silent)" (Keyword.tag_ml Keyword.diag)
   1.311 +  Outer_Syntax.command "ML_command" "diagnostic ML text (silent)" (Keyword.tag_ml Keyword.diag)
   1.312      (Parse.ML_source >> (Toplevel.no_timing oo IsarCmd.ml_diag false));
   1.313  
   1.314  val _ =
   1.315 -  OuterSyntax.command "setup" "ML theory setup" (Keyword.tag_ml Keyword.thy_decl)
   1.316 +  Outer_Syntax.command "setup" "ML theory setup" (Keyword.tag_ml Keyword.thy_decl)
   1.317      (Parse.ML_source >> (Toplevel.theory o IsarCmd.global_setup));
   1.318  
   1.319  val _ =
   1.320 -  OuterSyntax.local_theory "local_setup" "ML local theory setup" (Keyword.tag_ml Keyword.thy_decl)
   1.321 +  Outer_Syntax.local_theory "local_setup" "ML local theory setup" (Keyword.tag_ml Keyword.thy_decl)
   1.322      (Parse.ML_source >> IsarCmd.local_setup);
   1.323  
   1.324  val _ =
   1.325 -  OuterSyntax.command "attribute_setup" "define attribute in ML" (Keyword.tag_ml Keyword.thy_decl)
   1.326 +  Outer_Syntax.command "attribute_setup" "define attribute in ML" (Keyword.tag_ml Keyword.thy_decl)
   1.327      (Parse.position Parse.name -- Parse.!!! (Parse.$$$ "=" |-- Parse.ML_source -- Parse.text)
   1.328        >> (fn (name, (txt, cmt)) => Toplevel.theory (Attrib.attribute_setup name txt cmt)));
   1.329  
   1.330  val _ =
   1.331 -  OuterSyntax.command "method_setup" "define proof method in ML" (Keyword.tag_ml Keyword.thy_decl)
   1.332 +  Outer_Syntax.command "method_setup" "define proof method in ML" (Keyword.tag_ml Keyword.thy_decl)
   1.333      (Parse.position Parse.name -- Parse.!!! (Parse.$$$ "=" |-- Parse.ML_source -- Parse.text)
   1.334        >> (fn (name, (txt, cmt)) => Toplevel.theory (Method.method_setup name txt cmt)));
   1.335  
   1.336  val _ =
   1.337 -  OuterSyntax.local_theory "declaration" "generic ML declaration" (Keyword.tag_ml Keyword.thy_decl)
   1.338 +  Outer_Syntax.local_theory "declaration" "generic ML declaration" (Keyword.tag_ml Keyword.thy_decl)
   1.339      (Parse.opt_keyword "pervasive" -- Parse.ML_source >> uncurry IsarCmd.declaration);
   1.340  
   1.341  val _ =
   1.342 -  OuterSyntax.local_theory "simproc_setup" "define simproc in ML" (Keyword.tag_ml Keyword.thy_decl)
   1.343 +  Outer_Syntax.local_theory "simproc_setup" "define simproc in ML" (Keyword.tag_ml Keyword.thy_decl)
   1.344      (Parse.name --
   1.345        (Parse.$$$ "(" |-- Parse.enum1 "|" Parse.term --| Parse.$$$ ")" --| Parse.$$$ "=") --
   1.346        Parse.ML_source -- Scan.optional (Parse.$$$ "identifier" |-- Scan.repeat1 Parse.xname) []
   1.347 @@ -372,27 +372,27 @@
   1.348  val trfun = Parse.opt_keyword "advanced" -- Parse.ML_source;
   1.349  
   1.350  val _ =
   1.351 -  OuterSyntax.command "parse_ast_translation" "install parse ast translation functions"
   1.352 +  Outer_Syntax.command "parse_ast_translation" "install parse ast translation functions"
   1.353      (Keyword.tag_ml Keyword.thy_decl)
   1.354      (trfun >> (Toplevel.theory o IsarCmd.parse_ast_translation));
   1.355  
   1.356  val _ =
   1.357 -  OuterSyntax.command "parse_translation" "install parse translation functions"
   1.358 +  Outer_Syntax.command "parse_translation" "install parse translation functions"
   1.359      (Keyword.tag_ml Keyword.thy_decl)
   1.360      (trfun >> (Toplevel.theory o IsarCmd.parse_translation));
   1.361  
   1.362  val _ =
   1.363 -  OuterSyntax.command "print_translation" "install print translation functions"
   1.364 +  Outer_Syntax.command "print_translation" "install print translation functions"
   1.365      (Keyword.tag_ml Keyword.thy_decl)
   1.366      (trfun >> (Toplevel.theory o IsarCmd.print_translation));
   1.367  
   1.368  val _ =
   1.369 -  OuterSyntax.command "typed_print_translation" "install typed print translation functions"
   1.370 +  Outer_Syntax.command "typed_print_translation" "install typed print translation functions"
   1.371      (Keyword.tag_ml Keyword.thy_decl)
   1.372      (trfun >> (Toplevel.theory o IsarCmd.typed_print_translation));
   1.373  
   1.374  val _ =
   1.375 -  OuterSyntax.command "print_ast_translation" "install print ast translation functions"
   1.376 +  Outer_Syntax.command "print_ast_translation" "install print ast translation functions"
   1.377      (Keyword.tag_ml Keyword.thy_decl)
   1.378      (trfun >> (Toplevel.theory o IsarCmd.print_ast_translation));
   1.379  
   1.380 @@ -400,7 +400,7 @@
   1.381  (* oracles *)
   1.382  
   1.383  val _ =
   1.384 -  OuterSyntax.command "oracle" "declare oracle" (Keyword.tag_ml Keyword.thy_decl)
   1.385 +  Outer_Syntax.command "oracle" "declare oracle" (Keyword.tag_ml Keyword.thy_decl)
   1.386      (Parse.position Parse.name -- (Parse.$$$ "=" |-- Parse.ML_source) >>
   1.387        (fn (x, y) => Toplevel.theory (IsarCmd.oracle x y)));
   1.388  
   1.389 @@ -408,7 +408,7 @@
   1.390  (* local theories *)
   1.391  
   1.392  val _ =
   1.393 -  OuterSyntax.command "context" "enter local theory context" Keyword.thy_decl
   1.394 +  Outer_Syntax.command "context" "enter local theory context" Keyword.thy_decl
   1.395      (Parse.name --| Parse.begin >> (fn name =>
   1.396        Toplevel.print o Toplevel.begin_local_theory true (Theory_Target.context_cmd name)));
   1.397  
   1.398 @@ -421,7 +421,7 @@
   1.399    Scan.repeat1 Parse_Spec.context_element >> pair ([], []);
   1.400  
   1.401  val _ =
   1.402 -  OuterSyntax.command "locale" "define named proof context" Keyword.thy_decl
   1.403 +  Outer_Syntax.command "locale" "define named proof context" Keyword.thy_decl
   1.404      (Parse.binding --
   1.405        Scan.optional (Parse.$$$ "=" |-- Parse.!!! locale_val) (([], []), []) -- Parse.opt_begin
   1.406        >> (fn ((name, (expr, elems)), begin) =>
   1.407 @@ -429,7 +429,7 @@
   1.408              (Expression.add_locale_cmd name Binding.empty expr elems #> snd)));
   1.409  
   1.410  val _ =
   1.411 -  OuterSyntax.command "sublocale"
   1.412 +  Outer_Syntax.command "sublocale"
   1.413      "prove sublocale relation between a locale and a locale expression" Keyword.thy_goal
   1.414      (Parse.xname --| (Parse.$$$ "\\<subseteq>" || Parse.$$$ "<") --
   1.415        Parse.!!! (Parse_Spec.locale_expression false)
   1.416 @@ -437,7 +437,7 @@
   1.417            Toplevel.print o Toplevel.theory_to_proof (Expression.sublocale_cmd loc expr)));
   1.418  
   1.419  val _ =
   1.420 -  OuterSyntax.command "interpretation"
   1.421 +  Outer_Syntax.command "interpretation"
   1.422      "prove interpretation of locale expression in theory" Keyword.thy_goal
   1.423      (Parse.!!! (Parse_Spec.locale_expression true) --
   1.424        Scan.optional (Parse.where_ |-- Parse.and_list1 (Parse_Spec.opt_thm_name ":" -- Parse.prop)) []
   1.425 @@ -445,7 +445,7 @@
   1.426            Toplevel.theory_to_proof (Expression.interpretation_cmd expr equations)));
   1.427  
   1.428  val _ =
   1.429 -  OuterSyntax.command "interpret"
   1.430 +  Outer_Syntax.command "interpret"
   1.431      "prove interpretation of locale expression in proof context"
   1.432      (Keyword.tag_proof Keyword.prf_goal)
   1.433      (Parse.!!! (Parse_Spec.locale_expression true)
   1.434 @@ -460,24 +460,24 @@
   1.435    Scan.repeat1 Parse_Spec.context_element >> pair [];
   1.436  
   1.437  val _ =
   1.438 -  OuterSyntax.command "class" "define type class" Keyword.thy_decl
   1.439 +  Outer_Syntax.command "class" "define type class" Keyword.thy_decl
   1.440     (Parse.binding -- Scan.optional (Parse.$$$ "=" |-- class_val) ([], []) -- Parse.opt_begin
   1.441      >> (fn ((name, (supclasses, elems)), begin) =>
   1.442          (begin ? Toplevel.print) o Toplevel.begin_local_theory begin
   1.443            (Class.class_cmd name supclasses elems #> snd)));
   1.444  
   1.445  val _ =
   1.446 -  OuterSyntax.local_theory_to_proof "subclass" "prove a subclass relation" Keyword.thy_goal
   1.447 +  Outer_Syntax.local_theory_to_proof "subclass" "prove a subclass relation" Keyword.thy_goal
   1.448      (Parse.xname >> Class.subclass_cmd);
   1.449  
   1.450  val _ =
   1.451 -  OuterSyntax.command "instantiation" "instantiate and prove type arity" Keyword.thy_decl
   1.452 +  Outer_Syntax.command "instantiation" "instantiate and prove type arity" Keyword.thy_decl
   1.453     (Parse.multi_arity --| Parse.begin
   1.454       >> (fn arities => Toplevel.print o
   1.455           Toplevel.begin_local_theory true (Theory_Target.instantiation_cmd arities)));
   1.456  
   1.457  val _ =
   1.458 -  OuterSyntax.command "instance" "prove type arity or subclass relation" Keyword.thy_goal
   1.459 +  Outer_Syntax.command "instance" "prove type arity or subclass relation" Keyword.thy_goal
   1.460    ((Parse.xname -- ((Parse.$$$ "\\<subseteq>" || Parse.$$$ "<") |-- Parse.!!! Parse.xname)
   1.461          >> Class.classrel_cmd ||
   1.462      Parse.multi_arity >> Class.instance_arity_cmd)
   1.463 @@ -489,7 +489,7 @@
   1.464  (* arbitrary overloading *)
   1.465  
   1.466  val _ =
   1.467 -  OuterSyntax.command "overloading" "overloaded definitions" Keyword.thy_decl
   1.468 +  Outer_Syntax.command "overloading" "overloaded definitions" Keyword.thy_decl
   1.469     (Scan.repeat1 (Parse.name --| (Parse.$$$ "\\<equiv>" || Parse.$$$ "==") -- Parse.term --
   1.470        Scan.optional (Parse.$$$ "(" |-- (Parse.$$$ "unchecked" >> K false) --| Parse.$$$ ")") true
   1.471        >> Parse.triple1) --| Parse.begin
   1.472 @@ -500,7 +500,7 @@
   1.473  (* code generation *)
   1.474  
   1.475  val _ =
   1.476 -  OuterSyntax.command "code_datatype" "define set of code datatype constructors" Keyword.thy_decl
   1.477 +  Outer_Syntax.command "code_datatype" "define set of code datatype constructors" Keyword.thy_decl
   1.478      (Scan.repeat1 Parse.term >> (Toplevel.theory o Code.add_datatype_cmd));
   1.479  
   1.480  
   1.481 @@ -510,7 +510,7 @@
   1.482  (* statements *)
   1.483  
   1.484  fun gen_theorem schematic kind =
   1.485 -  OuterSyntax.local_theory_to_proof'
   1.486 +  Outer_Syntax.local_theory_to_proof'
   1.487      (if schematic then "schematic_" ^ kind else kind)
   1.488      ("state " ^ (if schematic then "schematic " ^ kind else kind))
   1.489      (if schematic then Keyword.thy_schematic_goal else Keyword.thy_goal)
   1.490 @@ -528,29 +528,29 @@
   1.491  val _ = gen_theorem true Thm.corollaryK;
   1.492  
   1.493  val _ =
   1.494 -  OuterSyntax.local_theory_to_proof "example_proof"
   1.495 +  Outer_Syntax.local_theory_to_proof "example_proof"
   1.496      "example proof body, without any result" Keyword.thy_schematic_goal
   1.497      (Scan.succeed
   1.498        (Specification.schematic_theorem_cmd "" NONE (K I)
   1.499          Attrib.empty_binding [] (Element.Shows []) false #> Proof.enter_forward));
   1.500  
   1.501  val _ =
   1.502 -  OuterSyntax.command "have" "state local goal"
   1.503 +  Outer_Syntax.command "have" "state local goal"
   1.504      (Keyword.tag_proof Keyword.prf_goal)
   1.505      (Parse_Spec.statement >> ((Toplevel.print oo Toplevel.proof') o IsarCmd.have));
   1.506  
   1.507  val _ =
   1.508 -  OuterSyntax.command "hence" "abbreviates \"then have\""
   1.509 +  Outer_Syntax.command "hence" "abbreviates \"then have\""
   1.510      (Keyword.tag_proof Keyword.prf_goal)
   1.511      (Parse_Spec.statement >> ((Toplevel.print oo Toplevel.proof') o IsarCmd.hence));
   1.512  
   1.513  val _ =
   1.514 -  OuterSyntax.command "show" "state local goal, solving current obligation"
   1.515 +  Outer_Syntax.command "show" "state local goal, solving current obligation"
   1.516      (Keyword.tag_proof Keyword.prf_asm_goal)
   1.517      (Parse_Spec.statement >> ((Toplevel.print oo Toplevel.proof') o IsarCmd.show));
   1.518  
   1.519  val _ =
   1.520 -  OuterSyntax.command "thus" "abbreviates \"then show\""
   1.521 +  Outer_Syntax.command "thus" "abbreviates \"then show\""
   1.522      (Keyword.tag_proof Keyword.prf_asm_goal)
   1.523      (Parse_Spec.statement >> ((Toplevel.print oo Toplevel.proof') o IsarCmd.thus));
   1.524  
   1.525 @@ -560,32 +560,32 @@
   1.526  val facts = Parse.and_list1 Parse_Spec.xthms1;
   1.527  
   1.528  val _ =
   1.529 -  OuterSyntax.command "then" "forward chaining"
   1.530 +  Outer_Syntax.command "then" "forward chaining"
   1.531      (Keyword.tag_proof Keyword.prf_chain)
   1.532      (Scan.succeed (Toplevel.print o Toplevel.proof Proof.chain));
   1.533  
   1.534  val _ =
   1.535 -  OuterSyntax.command "from" "forward chaining from given facts"
   1.536 +  Outer_Syntax.command "from" "forward chaining from given facts"
   1.537      (Keyword.tag_proof Keyword.prf_chain)
   1.538      (facts >> (Toplevel.print oo (Toplevel.proof o Proof.from_thmss_cmd)));
   1.539  
   1.540  val _ =
   1.541 -  OuterSyntax.command "with" "forward chaining from given and current facts"
   1.542 +  Outer_Syntax.command "with" "forward chaining from given and current facts"
   1.543      (Keyword.tag_proof Keyword.prf_chain)
   1.544      (facts >> (Toplevel.print oo (Toplevel.proof o Proof.with_thmss_cmd)));
   1.545  
   1.546  val _ =
   1.547 -  OuterSyntax.command "note" "define facts"
   1.548 +  Outer_Syntax.command "note" "define facts"
   1.549      (Keyword.tag_proof Keyword.prf_decl)
   1.550      (Parse_Spec.name_facts >> (Toplevel.print oo (Toplevel.proof o Proof.note_thmss_cmd)));
   1.551  
   1.552  val _ =
   1.553 -  OuterSyntax.command "using" "augment goal facts"
   1.554 +  Outer_Syntax.command "using" "augment goal facts"
   1.555      (Keyword.tag_proof Keyword.prf_decl)
   1.556      (facts >> (Toplevel.print oo (Toplevel.proof o Proof.using_cmd)));
   1.557  
   1.558  val _ =
   1.559 -  OuterSyntax.command "unfolding" "unfold definitions in goal and facts"
   1.560 +  Outer_Syntax.command "unfolding" "unfold definitions in goal and facts"
   1.561      (Keyword.tag_proof Keyword.prf_decl)
   1.562      (facts >> (Toplevel.print oo (Toplevel.proof o Proof.unfolding_cmd)));
   1.563  
   1.564 @@ -593,22 +593,22 @@
   1.565  (* proof context *)
   1.566  
   1.567  val _ =
   1.568 -  OuterSyntax.command "fix" "fix local variables (Skolem constants)"
   1.569 +  Outer_Syntax.command "fix" "fix local variables (Skolem constants)"
   1.570      (Keyword.tag_proof Keyword.prf_asm)
   1.571      (Parse.fixes >> (Toplevel.print oo (Toplevel.proof o Proof.fix_cmd)));
   1.572  
   1.573  val _ =
   1.574 -  OuterSyntax.command "assume" "assume propositions"
   1.575 +  Outer_Syntax.command "assume" "assume propositions"
   1.576      (Keyword.tag_proof Keyword.prf_asm)
   1.577      (Parse_Spec.statement >> (Toplevel.print oo (Toplevel.proof o Proof.assume_cmd)));
   1.578  
   1.579  val _ =
   1.580 -  OuterSyntax.command "presume" "assume propositions, to be established later"
   1.581 +  Outer_Syntax.command "presume" "assume propositions, to be established later"
   1.582      (Keyword.tag_proof Keyword.prf_asm)
   1.583      (Parse_Spec.statement >> (Toplevel.print oo (Toplevel.proof o Proof.presume_cmd)));
   1.584  
   1.585  val _ =
   1.586 -  OuterSyntax.command "def" "local definition"
   1.587 +  Outer_Syntax.command "def" "local definition"
   1.588      (Keyword.tag_proof Keyword.prf_asm)
   1.589      (Parse.and_list1
   1.590        (Parse_Spec.opt_thm_name ":" --
   1.591 @@ -617,24 +617,24 @@
   1.592      >> (Toplevel.print oo (Toplevel.proof o Proof.def_cmd)));
   1.593  
   1.594  val _ =
   1.595 -  OuterSyntax.command "obtain" "generalized existence"
   1.596 +  Outer_Syntax.command "obtain" "generalized existence"
   1.597      (Keyword.tag_proof Keyword.prf_asm_goal)
   1.598      (Parse.parname -- Scan.optional (Parse.fixes --| Parse.where_) [] -- Parse_Spec.statement
   1.599        >> (fn ((x, y), z) => Toplevel.print o Toplevel.proof' (Obtain.obtain_cmd x y z)));
   1.600  
   1.601  val _ =
   1.602 -  OuterSyntax.command "guess" "wild guessing (unstructured)"
   1.603 +  Outer_Syntax.command "guess" "wild guessing (unstructured)"
   1.604      (Keyword.tag_proof Keyword.prf_asm_goal)
   1.605      (Scan.optional Parse.fixes [] >> (Toplevel.print oo (Toplevel.proof' o Obtain.guess_cmd)));
   1.606  
   1.607  val _ =
   1.608 -  OuterSyntax.command "let" "bind text variables"
   1.609 +  Outer_Syntax.command "let" "bind text variables"
   1.610      (Keyword.tag_proof Keyword.prf_decl)
   1.611      (Parse.and_list1 (Parse.and_list1 Parse.term -- (Parse.$$$ "=" |-- Parse.term))
   1.612        >> (Toplevel.print oo (Toplevel.proof o Proof.let_bind_cmd)));
   1.613  
   1.614  val _ =
   1.615 -  OuterSyntax.command "write" "add concrete syntax for constants / fixed variables"
   1.616 +  Outer_Syntax.command "write" "add concrete syntax for constants / fixed variables"
   1.617      (Keyword.tag_proof Keyword.prf_decl)
   1.618      (opt_mode -- Parse.and_list1 (Parse.xname -- Parse_Spec.locale_mixfix)
   1.619      >> (fn (mode, args) => Toplevel.print o Toplevel.proof (Proof.write_cmd mode args)));
   1.620 @@ -645,7 +645,7 @@
   1.621      Parse.xname >> rpair []) -- Parse_Spec.opt_attribs >> Parse.triple1;
   1.622  
   1.623  val _ =
   1.624 -  OuterSyntax.command "case" "invoke local context"
   1.625 +  Outer_Syntax.command "case" "invoke local context"
   1.626      (Keyword.tag_proof Keyword.prf_asm)
   1.627      (case_spec >> (Toplevel.print oo (Toplevel.proof o Proof.invoke_case_cmd)));
   1.628  
   1.629 @@ -653,17 +653,17 @@
   1.630  (* proof structure *)
   1.631  
   1.632  val _ =
   1.633 -  OuterSyntax.command "{" "begin explicit proof block"
   1.634 +  Outer_Syntax.command "{" "begin explicit proof block"
   1.635      (Keyword.tag_proof Keyword.prf_open)
   1.636      (Scan.succeed (Toplevel.print o Toplevel.proof Proof.begin_block));
   1.637  
   1.638  val _ =
   1.639 -  OuterSyntax.command "}" "end explicit proof block"
   1.640 +  Outer_Syntax.command "}" "end explicit proof block"
   1.641      (Keyword.tag_proof Keyword.prf_close)
   1.642      (Scan.succeed (Toplevel.print o Toplevel.proof Proof.end_block));
   1.643  
   1.644  val _ =
   1.645 -  OuterSyntax.command "next" "enter next proof block"
   1.646 +  Outer_Syntax.command "next" "enter next proof block"
   1.647      (Keyword.tag_proof Keyword.prf_block)
   1.648      (Scan.succeed (Toplevel.print o Toplevel.proof Proof.next_block));
   1.649  
   1.650 @@ -671,37 +671,37 @@
   1.651  (* end proof *)
   1.652  
   1.653  val _ =
   1.654 -  OuterSyntax.command "qed" "conclude (sub-)proof"
   1.655 +  Outer_Syntax.command "qed" "conclude (sub-)proof"
   1.656      (Keyword.tag_proof Keyword.qed_block)
   1.657      (Scan.option Method.parse >> IsarCmd.qed);
   1.658  
   1.659  val _ =
   1.660 -  OuterSyntax.command "by" "terminal backward proof"
   1.661 +  Outer_Syntax.command "by" "terminal backward proof"
   1.662      (Keyword.tag_proof Keyword.qed)
   1.663      (Method.parse -- Scan.option Method.parse >> IsarCmd.terminal_proof);
   1.664  
   1.665  val _ =
   1.666 -  OuterSyntax.command ".." "default proof"
   1.667 +  Outer_Syntax.command ".." "default proof"
   1.668      (Keyword.tag_proof Keyword.qed)
   1.669      (Scan.succeed IsarCmd.default_proof);
   1.670  
   1.671  val _ =
   1.672 -  OuterSyntax.command "." "immediate proof"
   1.673 +  Outer_Syntax.command "." "immediate proof"
   1.674      (Keyword.tag_proof Keyword.qed)
   1.675      (Scan.succeed IsarCmd.immediate_proof);
   1.676  
   1.677  val _ =
   1.678 -  OuterSyntax.command "done" "done proof"
   1.679 +  Outer_Syntax.command "done" "done proof"
   1.680      (Keyword.tag_proof Keyword.qed)
   1.681      (Scan.succeed IsarCmd.done_proof);
   1.682  
   1.683  val _ =
   1.684 -  OuterSyntax.command "sorry" "skip proof (quick-and-dirty mode only!)"
   1.685 +  Outer_Syntax.command "sorry" "skip proof (quick-and-dirty mode only!)"
   1.686      (Keyword.tag_proof Keyword.qed)
   1.687      (Scan.succeed IsarCmd.skip_proof);
   1.688  
   1.689  val _ =
   1.690 -  OuterSyntax.command "oops" "forget proof"
   1.691 +  Outer_Syntax.command "oops" "forget proof"
   1.692      (Keyword.tag_proof Keyword.qed_global)
   1.693      (Scan.succeed Toplevel.forget_proof);
   1.694  
   1.695 @@ -709,27 +709,27 @@
   1.696  (* proof steps *)
   1.697  
   1.698  val _ =
   1.699 -  OuterSyntax.command "defer" "shuffle internal proof state"
   1.700 +  Outer_Syntax.command "defer" "shuffle internal proof state"
   1.701      (Keyword.tag_proof Keyword.prf_script)
   1.702      (Scan.option Parse.nat >> (Toplevel.print oo (Toplevel.proofs o Proof.defer)));
   1.703  
   1.704  val _ =
   1.705 -  OuterSyntax.command "prefer" "shuffle internal proof state"
   1.706 +  Outer_Syntax.command "prefer" "shuffle internal proof state"
   1.707      (Keyword.tag_proof Keyword.prf_script)
   1.708      (Parse.nat >> (Toplevel.print oo (Toplevel.proofs o Proof.prefer)));
   1.709  
   1.710  val _ =
   1.711 -  OuterSyntax.command "apply" "initial refinement step (unstructured)"
   1.712 +  Outer_Syntax.command "apply" "initial refinement step (unstructured)"
   1.713      (Keyword.tag_proof Keyword.prf_script)
   1.714      (Method.parse >> (Toplevel.print oo (Toplevel.proofs o Proof.apply)));
   1.715  
   1.716  val _ =
   1.717 -  OuterSyntax.command "apply_end" "terminal refinement (unstructured)"
   1.718 +  Outer_Syntax.command "apply_end" "terminal refinement (unstructured)"
   1.719      (Keyword.tag_proof Keyword.prf_script)
   1.720      (Method.parse >> (Toplevel.print oo (Toplevel.proofs o Proof.apply_end)));
   1.721  
   1.722  val _ =
   1.723 -  OuterSyntax.command "proof" "backward proof"
   1.724 +  Outer_Syntax.command "proof" "backward proof"
   1.725      (Keyword.tag_proof Keyword.prf_block)
   1.726      (Scan.option Method.parse >> (fn m => Toplevel.print o
   1.727        Toplevel.actual_proof (Proof_Node.applys (Proof.proof m)) o
   1.728 @@ -742,22 +742,22 @@
   1.729    Scan.option (Parse.$$$ "(" |-- Parse.!!! ((Parse_Spec.xthms1 --| Parse.$$$ ")")));
   1.730  
   1.731  val _ =
   1.732 -  OuterSyntax.command "also" "combine calculation and current facts"
   1.733 +  Outer_Syntax.command "also" "combine calculation and current facts"
   1.734      (Keyword.tag_proof Keyword.prf_decl)
   1.735      (calc_args >> (Toplevel.proofs' o Calculation.also_cmd));
   1.736  
   1.737  val _ =
   1.738 -  OuterSyntax.command "finally" "combine calculation and current facts, exhibit result"
   1.739 +  Outer_Syntax.command "finally" "combine calculation and current facts, exhibit result"
   1.740      (Keyword.tag_proof Keyword.prf_chain)
   1.741      (calc_args >> (Toplevel.proofs' o Calculation.finally_cmd));
   1.742  
   1.743  val _ =
   1.744 -  OuterSyntax.command "moreover" "augment calculation by current facts"
   1.745 +  Outer_Syntax.command "moreover" "augment calculation by current facts"
   1.746      (Keyword.tag_proof Keyword.prf_decl)
   1.747      (Scan.succeed (Toplevel.proof' Calculation.moreover));
   1.748  
   1.749  val _ =
   1.750 -  OuterSyntax.command "ultimately" "augment calculation by current facts, exhibit result"
   1.751 +  Outer_Syntax.command "ultimately" "augment calculation by current facts, exhibit result"
   1.752      (Keyword.tag_proof Keyword.prf_chain)
   1.753      (Scan.succeed (Toplevel.proof' Calculation.ultimately));
   1.754  
   1.755 @@ -765,7 +765,7 @@
   1.756  (* proof navigation *)
   1.757  
   1.758  val _ =
   1.759 -  OuterSyntax.command "back" "backtracking of proof command"
   1.760 +  Outer_Syntax.command "back" "backtracking of proof command"
   1.761      (Keyword.tag_proof Keyword.prf_script)
   1.762      (Scan.succeed (Toplevel.print o Toplevel.actual_proof Proof_Node.back o Toplevel.skip_proof I));
   1.763  
   1.764 @@ -778,9 +778,9 @@
   1.765        (Position.of_properties (Position.default_properties pos props), str));
   1.766  
   1.767  val _ =
   1.768 -  OuterSyntax.improper_command "Isabelle.command" "nested Isabelle command" Keyword.control
   1.769 +  Outer_Syntax.improper_command "Isabelle.command" "nested Isabelle command" Keyword.control
   1.770      (props_text :|-- (fn (pos, str) =>
   1.771 -      (case OuterSyntax.parse pos str of
   1.772 +      (case Outer_Syntax.parse pos str of
   1.773          [tr] => Scan.succeed (K tr)
   1.774        | _ => Scan.fail_with (K "exactly one command expected"))
   1.775        handle ERROR msg => Scan.fail_with (K msg)));
   1.776 @@ -795,145 +795,145 @@
   1.777  val opt_bang = Scan.optional (Parse.$$$ "!" >> K true) false;
   1.778  
   1.779  val _ =
   1.780 -  OuterSyntax.improper_command "pretty_setmargin" "change default margin for pretty printing"
   1.781 +  Outer_Syntax.improper_command "pretty_setmargin" "change default margin for pretty printing"
   1.782      Keyword.diag (Parse.nat >> (Toplevel.no_timing oo IsarCmd.pretty_setmargin));
   1.783  
   1.784  val _ =
   1.785 -  OuterSyntax.improper_command "help" "print outer syntax commands" Keyword.diag
   1.786 -    (Scan.succeed (Toplevel.no_timing o Toplevel.imperative OuterSyntax.print_outer_syntax));
   1.787 +  Outer_Syntax.improper_command "help" "print outer syntax commands" Keyword.diag
   1.788 +    (Scan.succeed (Toplevel.no_timing o Toplevel.imperative Outer_Syntax.print_outer_syntax));
   1.789  
   1.790  val _ =
   1.791 -  OuterSyntax.improper_command "print_commands" "print outer syntax commands" Keyword.diag
   1.792 -    (Scan.succeed (Toplevel.no_timing o Toplevel.imperative OuterSyntax.print_outer_syntax));
   1.793 +  Outer_Syntax.improper_command "print_commands" "print outer syntax commands" Keyword.diag
   1.794 +    (Scan.succeed (Toplevel.no_timing o Toplevel.imperative Outer_Syntax.print_outer_syntax));
   1.795  
   1.796  val _ =
   1.797 -  OuterSyntax.improper_command "print_configs" "print configuration options" Keyword.diag
   1.798 +  Outer_Syntax.improper_command "print_configs" "print configuration options" Keyword.diag
   1.799      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_configs));
   1.800  
   1.801  val _ =
   1.802 -  OuterSyntax.improper_command "print_context" "print theory context name" Keyword.diag
   1.803 +  Outer_Syntax.improper_command "print_context" "print theory context name" Keyword.diag
   1.804      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_context));
   1.805  
   1.806  val _ =
   1.807 -  OuterSyntax.improper_command "print_theory" "print logical theory contents (verbose!)"
   1.808 +  Outer_Syntax.improper_command "print_theory" "print logical theory contents (verbose!)"
   1.809      Keyword.diag (opt_bang >> (Toplevel.no_timing oo IsarCmd.print_theory));
   1.810  
   1.811  val _ =
   1.812 -  OuterSyntax.improper_command "print_syntax" "print inner syntax of context (verbose!)"
   1.813 +  Outer_Syntax.improper_command "print_syntax" "print inner syntax of context (verbose!)"
   1.814      Keyword.diag (Scan.succeed (Toplevel.no_timing o IsarCmd.print_syntax));
   1.815  
   1.816  val _ =
   1.817 -  OuterSyntax.improper_command "print_abbrevs" "print constant abbreviation of context"
   1.818 +  Outer_Syntax.improper_command "print_abbrevs" "print constant abbreviation of context"
   1.819      Keyword.diag (Scan.succeed (Toplevel.no_timing o IsarCmd.print_abbrevs));
   1.820  
   1.821  val _ =
   1.822 -  OuterSyntax.improper_command "print_theorems"
   1.823 +  Outer_Syntax.improper_command "print_theorems"
   1.824        "print theorems of local theory or proof context" Keyword.diag
   1.825      (opt_bang >> (Toplevel.no_timing oo IsarCmd.print_theorems));
   1.826  
   1.827  val _ =
   1.828 -  OuterSyntax.improper_command "print_locales" "print locales of this theory" Keyword.diag
   1.829 +  Outer_Syntax.improper_command "print_locales" "print locales of this theory" Keyword.diag
   1.830      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_locales));
   1.831  
   1.832  val _ =
   1.833 -  OuterSyntax.improper_command "print_classes" "print classes of this theory" Keyword.diag
   1.834 +  Outer_Syntax.improper_command "print_classes" "print classes of this theory" Keyword.diag
   1.835      (Scan.succeed (Toplevel.no_timing o Toplevel.unknown_theory
   1.836        o Toplevel.keep (Class.print_classes o Toplevel.theory_of)));
   1.837  
   1.838  val _ =
   1.839 -  OuterSyntax.improper_command "print_locale" "print locale of this theory" Keyword.diag
   1.840 +  Outer_Syntax.improper_command "print_locale" "print locale of this theory" Keyword.diag
   1.841      (opt_bang -- Parse.xname >> (Toplevel.no_timing oo IsarCmd.print_locale));
   1.842  
   1.843  val _ =
   1.844 -  OuterSyntax.improper_command "print_interps"
   1.845 +  Outer_Syntax.improper_command "print_interps"
   1.846      "print interpretations of locale for this theory" Keyword.diag
   1.847      (Parse.xname >> (Toplevel.no_timing oo IsarCmd.print_registrations));
   1.848  
   1.849  val _ =
   1.850 -  OuterSyntax.improper_command "print_attributes" "print attributes of this theory" Keyword.diag
   1.851 +  Outer_Syntax.improper_command "print_attributes" "print attributes of this theory" Keyword.diag
   1.852      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_attributes));
   1.853  
   1.854  val _ =
   1.855 -  OuterSyntax.improper_command "print_simpset" "print context of Simplifier" Keyword.diag
   1.856 +  Outer_Syntax.improper_command "print_simpset" "print context of Simplifier" Keyword.diag
   1.857      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_simpset));
   1.858  
   1.859  val _ =
   1.860 -  OuterSyntax.improper_command "print_rules" "print intro/elim rules" Keyword.diag
   1.861 +  Outer_Syntax.improper_command "print_rules" "print intro/elim rules" Keyword.diag
   1.862      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_rules));
   1.863  
   1.864  val _ =
   1.865 -  OuterSyntax.improper_command "print_trans_rules" "print transitivity rules" Keyword.diag
   1.866 +  Outer_Syntax.improper_command "print_trans_rules" "print transitivity rules" Keyword.diag
   1.867      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_trans_rules));
   1.868  
   1.869  val _ =
   1.870 -  OuterSyntax.improper_command "print_methods" "print methods of this theory" Keyword.diag
   1.871 +  Outer_Syntax.improper_command "print_methods" "print methods of this theory" Keyword.diag
   1.872      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_methods));
   1.873  
   1.874  val _ =
   1.875 -  OuterSyntax.improper_command "print_antiquotations" "print antiquotations (global)" Keyword.diag
   1.876 +  Outer_Syntax.improper_command "print_antiquotations" "print antiquotations (global)" Keyword.diag
   1.877      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_antiquotations));
   1.878  
   1.879  val _ =
   1.880 -  OuterSyntax.improper_command "thy_deps" "visualize theory dependencies"
   1.881 +  Outer_Syntax.improper_command "thy_deps" "visualize theory dependencies"
   1.882      Keyword.diag (Scan.succeed (Toplevel.no_timing o IsarCmd.thy_deps));
   1.883  
   1.884  val _ =
   1.885 -  OuterSyntax.improper_command "class_deps" "visualize class dependencies"
   1.886 +  Outer_Syntax.improper_command "class_deps" "visualize class dependencies"
   1.887      Keyword.diag (Scan.succeed (Toplevel.no_timing o IsarCmd.class_deps));
   1.888  
   1.889  val _ =
   1.890 -  OuterSyntax.improper_command "thm_deps" "visualize theorem dependencies"
   1.891 +  Outer_Syntax.improper_command "thm_deps" "visualize theorem dependencies"
   1.892      Keyword.diag (Parse_Spec.xthms1 >> (Toplevel.no_timing oo IsarCmd.thm_deps));
   1.893  
   1.894  val _ =
   1.895 -  OuterSyntax.improper_command "print_binds" "print term bindings of proof context" Keyword.diag
   1.896 +  Outer_Syntax.improper_command "print_binds" "print term bindings of proof context" Keyword.diag
   1.897      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_binds));
   1.898  
   1.899  val _ =
   1.900 -  OuterSyntax.improper_command "print_facts" "print facts of proof context" Keyword.diag
   1.901 +  Outer_Syntax.improper_command "print_facts" "print facts of proof context" Keyword.diag
   1.902      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_facts));
   1.903  
   1.904  val _ =
   1.905 -  OuterSyntax.improper_command "print_cases" "print cases of proof context" Keyword.diag
   1.906 +  Outer_Syntax.improper_command "print_cases" "print cases of proof context" Keyword.diag
   1.907      (Scan.succeed (Toplevel.no_timing o IsarCmd.print_cases));
   1.908  
   1.909  val _ =
   1.910 -  OuterSyntax.improper_command "print_statement" "print theorems as long statements" Keyword.diag
   1.911 +  Outer_Syntax.improper_command "print_statement" "print theorems as long statements" Keyword.diag
   1.912      (opt_modes -- Parse_Spec.xthms1 >> (Toplevel.no_timing oo IsarCmd.print_stmts));
   1.913  
   1.914  val _ =
   1.915 -  OuterSyntax.improper_command "thm" "print theorems" Keyword.diag
   1.916 +  Outer_Syntax.improper_command "thm" "print theorems" Keyword.diag
   1.917      (opt_modes -- Parse_Spec.xthms1 >> (Toplevel.no_timing oo IsarCmd.print_thms));
   1.918  
   1.919  val _ =
   1.920 -  OuterSyntax.improper_command "prf" "print proof terms of theorems" Keyword.diag
   1.921 +  Outer_Syntax.improper_command "prf" "print proof terms of theorems" Keyword.diag
   1.922      (opt_modes -- Scan.option Parse_Spec.xthms1
   1.923        >> (Toplevel.no_timing oo IsarCmd.print_prfs false));
   1.924  
   1.925  val _ =
   1.926 -  OuterSyntax.improper_command "full_prf" "print full proof terms of theorems" Keyword.diag
   1.927 +  Outer_Syntax.improper_command "full_prf" "print full proof terms of theorems" Keyword.diag
   1.928      (opt_modes -- Scan.option Parse_Spec.xthms1 >> (Toplevel.no_timing oo IsarCmd.print_prfs true));
   1.929  
   1.930  val _ =
   1.931 -  OuterSyntax.improper_command "prop" "read and print proposition" Keyword.diag
   1.932 +  Outer_Syntax.improper_command "prop" "read and print proposition" Keyword.diag
   1.933      (opt_modes -- Parse.term >> (Toplevel.no_timing oo IsarCmd.print_prop));
   1.934  
   1.935  val _ =
   1.936 -  OuterSyntax.improper_command "term" "read and print term" Keyword.diag
   1.937 +  Outer_Syntax.improper_command "term" "read and print term" Keyword.diag
   1.938      (opt_modes -- Parse.term >> (Toplevel.no_timing oo IsarCmd.print_term));
   1.939  
   1.940  val _ =
   1.941 -  OuterSyntax.improper_command "typ" "read and print type" Keyword.diag
   1.942 +  Outer_Syntax.improper_command "typ" "read and print type" Keyword.diag
   1.943      (opt_modes -- Parse.typ >> (Toplevel.no_timing oo IsarCmd.print_type));
   1.944  
   1.945  val _ =
   1.946 -  OuterSyntax.improper_command "print_codesetup" "print code generator setup" Keyword.diag
   1.947 +  Outer_Syntax.improper_command "print_codesetup" "print code generator setup" Keyword.diag
   1.948      (Scan.succeed
   1.949        (Toplevel.no_timing o Toplevel.unknown_theory o Toplevel.keep
   1.950          (Code.print_codesetup o Toplevel.theory_of)));
   1.951  
   1.952  val _ =
   1.953 -  OuterSyntax.improper_command "unused_thms" "find unused theorems" Keyword.diag
   1.954 +  Outer_Syntax.improper_command "unused_thms" "find unused theorems" Keyword.diag
   1.955      (Scan.option ((Scan.repeat1 (Scan.unless Parse.minus Parse.name) --| Parse.minus) --
   1.956         Scan.option (Scan.repeat1 (Scan.unless Parse.minus Parse.name))) >>
   1.957           (Toplevel.no_timing oo IsarCmd.unused_thms));
   1.958 @@ -943,66 +943,66 @@
   1.959  (** system commands (for interactive mode only) **)
   1.960  
   1.961  val _ =
   1.962 -  OuterSyntax.improper_command "cd" "change current working directory" Keyword.diag
   1.963 +  Outer_Syntax.improper_command "cd" "change current working directory" Keyword.diag
   1.964      (Parse.path >> (Toplevel.no_timing oo IsarCmd.cd));
   1.965  
   1.966  val _ =
   1.967 -  OuterSyntax.improper_command "pwd" "print current working directory" Keyword.diag
   1.968 +  Outer_Syntax.improper_command "pwd" "print current working directory" Keyword.diag
   1.969      (Scan.succeed (Toplevel.no_timing o IsarCmd.pwd));
   1.970  
   1.971  val _ =
   1.972 -  OuterSyntax.improper_command "use_thy" "use theory file" Keyword.diag
   1.973 +  Outer_Syntax.improper_command "use_thy" "use theory file" Keyword.diag
   1.974      (Parse.name >> (fn name =>
   1.975        Toplevel.no_timing o Toplevel.imperative (fn () => ThyInfo.use_thy name)));
   1.976  
   1.977  val _ =
   1.978 -  OuterSyntax.improper_command "touch_thy" "outdate theory, including descendants" Keyword.diag
   1.979 +  Outer_Syntax.improper_command "touch_thy" "outdate theory, including descendants" Keyword.diag
   1.980      (Parse.name >> (fn name =>
   1.981        Toplevel.no_timing o Toplevel.imperative (fn () => ThyInfo.touch_thy name)));
   1.982  
   1.983  val _ =
   1.984 -  OuterSyntax.improper_command "remove_thy" "remove theory from loader database" Keyword.diag
   1.985 +  Outer_Syntax.improper_command "remove_thy" "remove theory from loader database" Keyword.diag
   1.986      (Parse.name >> (fn name =>
   1.987        Toplevel.no_timing o Toplevel.imperative (fn () => ThyInfo.remove_thy name)));
   1.988  
   1.989  val _ =
   1.990 -  OuterSyntax.improper_command "kill_thy" "kill theory -- try to remove from loader database"
   1.991 +  Outer_Syntax.improper_command "kill_thy" "kill theory -- try to remove from loader database"
   1.992      Keyword.diag (Parse.name >> (fn name =>
   1.993        Toplevel.no_timing o Toplevel.imperative (fn () => ThyInfo.kill_thy name)));
   1.994  
   1.995  val _ =
   1.996 -  OuterSyntax.improper_command "display_drafts" "display raw source files with symbols"
   1.997 +  Outer_Syntax.improper_command "display_drafts" "display raw source files with symbols"
   1.998      Keyword.diag (Scan.repeat1 Parse.path >> (Toplevel.no_timing oo IsarCmd.display_drafts));
   1.999  
  1.1000  val _ =
  1.1001 -  OuterSyntax.improper_command "print_drafts" "print raw source files with symbols"
  1.1002 +  Outer_Syntax.improper_command "print_drafts" "print raw source files with symbols"
  1.1003      Keyword.diag (Scan.repeat1 Parse.path >> (Toplevel.no_timing oo IsarCmd.print_drafts));
  1.1004  
  1.1005  val opt_limits =
  1.1006    Scan.option Parse.nat -- Scan.option (Parse.$$$ "," |-- Parse.!!! Parse.nat);
  1.1007  
  1.1008  val _ =
  1.1009 -  OuterSyntax.improper_command "pr" "print current proof state (if present)" Keyword.diag
  1.1010 +  Outer_Syntax.improper_command "pr" "print current proof state (if present)" Keyword.diag
  1.1011      (opt_modes -- opt_limits >> (Toplevel.no_timing oo IsarCmd.pr));
  1.1012  
  1.1013  val _ =
  1.1014 -  OuterSyntax.improper_command "disable_pr" "disable printing of toplevel state" Keyword.diag
  1.1015 +  Outer_Syntax.improper_command "disable_pr" "disable printing of toplevel state" Keyword.diag
  1.1016      (Scan.succeed (Toplevel.no_timing o IsarCmd.disable_pr));
  1.1017  
  1.1018  val _ =
  1.1019 -  OuterSyntax.improper_command "enable_pr" "enable printing of toplevel state" Keyword.diag
  1.1020 +  Outer_Syntax.improper_command "enable_pr" "enable printing of toplevel state" Keyword.diag
  1.1021      (Scan.succeed (Toplevel.no_timing o IsarCmd.enable_pr));
  1.1022  
  1.1023  val _ =
  1.1024 -  OuterSyntax.improper_command "commit" "commit current session to ML database" Keyword.diag
  1.1025 +  Outer_Syntax.improper_command "commit" "commit current session to ML database" Keyword.diag
  1.1026      (Parse.opt_unit >> K (Toplevel.no_timing o Toplevel.imperative Secure.commit));
  1.1027  
  1.1028  val _ =
  1.1029 -  OuterSyntax.improper_command "quit" "quit Isabelle" Keyword.control
  1.1030 +  Outer_Syntax.improper_command "quit" "quit Isabelle" Keyword.control
  1.1031      (Parse.opt_unit >> (Toplevel.no_timing oo K IsarCmd.quit));
  1.1032  
  1.1033  val _ =
  1.1034 -  OuterSyntax.improper_command "exit" "exit Isar loop" Keyword.control
  1.1035 +  Outer_Syntax.improper_command "exit" "exit Isar loop" Keyword.control
  1.1036      (Scan.succeed (Toplevel.no_timing o IsarCmd.exit));
  1.1037  
  1.1038  end;