src/Pure/Isar/isar_syn.ML
changeset 60555 51a6997b1384
parent 60461 22995ec9fefd
child 60565 b7ee41f72add
equal deleted inserted replaced
60554:c0e1c121c7c0 60555:51a6997b1384
   489 val _ = theorem @{command_keyword schematic_lemma} true Thm.lemmaK;
   489 val _ = theorem @{command_keyword schematic_lemma} true Thm.lemmaK;
   490 val _ = theorem @{command_keyword schematic_corollary} true Thm.corollaryK;
   490 val _ = theorem @{command_keyword schematic_corollary} true Thm.corollaryK;
   491 
   491 
   492 
   492 
   493 val structured_statement =
   493 val structured_statement =
   494   Parse_Spec.statement -- Parse_Spec.if_statement -- Parse.for_fixes
   494   Parse_Spec.statement -- Parse_Spec.cond_statement -- Parse.for_fixes
   495     >> (fn ((shows, assumes), fixes) => (fixes, assumes, shows));
   495     >> (fn ((shows, (strict, assumes)), fixes) => (strict, fixes, assumes, shows));
   496 
   496 
   497 val _ =
   497 val _ =
   498   Outer_Syntax.command @{command_keyword have} "state local goal"
   498   Outer_Syntax.command @{command_keyword have} "state local goal"
   499     (structured_statement >> (fn (a, b, c) =>
   499     (structured_statement >> (fn (a, b, c, d) =>
   500       Toplevel.proof' (fn int => Proof.have_cmd NONE (K I) a b c int #> #2)));
   500       Toplevel.proof' (fn int => Proof.have_cmd a NONE (K I) b c d int #> #2)));
   501 
   501 
   502 val _ =
   502 val _ =
   503   Outer_Syntax.command @{command_keyword show} "state local goal, to refine pending subgoals"
   503   Outer_Syntax.command @{command_keyword show} "state local goal, to refine pending subgoals"
   504     (structured_statement >> (fn (a, b, c) =>
   504     (structured_statement >> (fn (a, b, c, d) =>
   505       Toplevel.proof' (fn int => Proof.show_cmd NONE (K I) a b c int #> #2)));
   505       Toplevel.proof' (fn int => Proof.show_cmd a NONE (K I) b c d int #> #2)));
   506 
   506 
   507 val _ =
   507 val _ =
   508   Outer_Syntax.command @{command_keyword hence} "old-style alias of \"then have\""
   508   Outer_Syntax.command @{command_keyword hence} "old-style alias of \"then have\""
   509     (structured_statement >> (fn (a, b, c) =>
   509     (structured_statement >> (fn (a, b, c, d) =>
   510       Toplevel.proof' (fn int => Proof.chain #> Proof.have_cmd NONE (K I) a b c int #> #2)));
   510       Toplevel.proof' (fn int => Proof.chain #> Proof.have_cmd a NONE (K I) b c d int #> #2)));
   511 
   511 
   512 val _ =
   512 val _ =
   513   Outer_Syntax.command @{command_keyword thus} "old-style alias of  \"then show\""
   513   Outer_Syntax.command @{command_keyword thus} "old-style alias of  \"then show\""
   514     (structured_statement >> (fn (a, b, c) =>
   514     (structured_statement >> (fn (a, b, c, d) =>
   515       Toplevel.proof' (fn int => Proof.chain #> Proof.show_cmd NONE (K I) a b c int #> #2)));
   515       Toplevel.proof' (fn int => Proof.chain #> Proof.show_cmd a NONE (K I) b c d int #> #2)));
   516 
   516 
   517 
   517 
   518 (* facts *)
   518 (* facts *)
   519 
   519 
   520 val facts = Parse.and_list1 Parse.xthms1;
   520 val facts = Parse.and_list1 Parse.xthms1;