482 val _ = theorem @{command_keyword corollary} false Thm.corollaryK; |
487 val _ = theorem @{command_keyword corollary} false Thm.corollaryK; |
483 val _ = theorem @{command_keyword schematic_theorem} true Thm.theoremK; |
488 val _ = theorem @{command_keyword schematic_theorem} true Thm.theoremK; |
484 val _ = theorem @{command_keyword schematic_lemma} true Thm.lemmaK; |
489 val _ = theorem @{command_keyword schematic_lemma} true Thm.lemmaK; |
485 val _ = theorem @{command_keyword schematic_corollary} true Thm.corollaryK; |
490 val _ = theorem @{command_keyword schematic_corollary} true Thm.corollaryK; |
486 |
491 |
487 val _ = |
492 |
488 Outer_Syntax.local_theory_to_proof @{command_keyword notepad} "begin proof context" |
493 val structured_statement = |
489 (Parse.begin >> K Proof.begin_notepad); |
494 Parse_Spec.statement -- Parse_Spec.if_prems -- Parse.for_fixes >> (fn ((a, b), c) => (c, b, a)); |
490 |
495 |
491 val _ = |
496 val _ = |
492 Outer_Syntax.command @{command_keyword have} "state local goal" |
497 Outer_Syntax.command @{command_keyword have} "state local goal" |
493 (Parse_Spec.statement -- Parse.for_fixes >> (fn (stmt, fixes) => |
498 (structured_statement >> (fn (fixes, assumes, shows) => |
494 Toplevel.proof' (fn int => Proof.have_cmd NONE (K I) fixes stmt int))); |
499 Toplevel.proof' (fn int => Proof.have_cmd NONE (K I) fixes assumes shows int))); |
495 |
500 |
496 val _ = |
501 val _ = |
497 Outer_Syntax.command @{command_keyword show} "state local goal, to refine pending subgoals" |
502 Outer_Syntax.command @{command_keyword show} "state local goal, to refine pending subgoals" |
498 (Parse_Spec.statement -- Parse.for_fixes >> (fn (stmt, fixes) => |
503 (structured_statement >> (fn (fixes, assumes, shows) => |
499 Toplevel.proof' (fn int => Proof.show_cmd NONE (K I) fixes stmt int))); |
504 Toplevel.proof' (fn int => Proof.show_cmd NONE (K I) fixes assumes shows int))); |
500 |
505 |
501 val _ = |
506 val _ = |
502 Outer_Syntax.command @{command_keyword hence} "old-style alias of \"then have\"" |
507 Outer_Syntax.command @{command_keyword hence} "old-style alias of \"then have\"" |
503 (Parse_Spec.statement -- Parse.for_fixes >> (fn (stmt, fixes) => |
508 (structured_statement >> (fn (fixes, assumes, shows) => |
504 Toplevel.proof' (fn int => Proof.chain #> Proof.have_cmd NONE (K I) fixes stmt int))); |
509 Toplevel.proof' (fn int => Proof.chain #> Proof.have_cmd NONE (K I) fixes assumes shows int))); |
505 |
510 |
506 val _ = |
511 val _ = |
507 Outer_Syntax.command @{command_keyword thus} "old-style alias of \"then show\"" |
512 Outer_Syntax.command @{command_keyword thus} "old-style alias of \"then show\"" |
508 (Parse_Spec.statement -- Parse.for_fixes >> (fn (stmt, fixes) => |
513 (structured_statement >> (fn (fixes, assumes, shows) => |
509 Toplevel.proof' (fn int => Proof.chain #> Proof.show_cmd NONE (K I) fixes stmt int))); |
514 Toplevel.proof' (fn int => Proof.chain #> Proof.show_cmd NONE (K I) fixes assumes shows int))); |
510 |
515 |
511 |
516 |
512 (* facts *) |
517 (* facts *) |
513 |
518 |
514 val facts = Parse.and_list1 Parse.xthms1; |
519 val facts = Parse.and_list1 Parse.xthms1; |