src/Pure/Isar/isar_syn.ML
changeset 61337 4645502c3c64
parent 61336 fa4ebbd350ae
child 61338 de610e8df459
equal deleted inserted replaced
61336:fa4ebbd350ae 61337:4645502c3c64
   150       >> (fn (x, y) => Toplevel.theory (#2 o Specification.axiomatization_cmd x y)));
   150       >> (fn (x, y) => Toplevel.theory (#2 o Specification.axiomatization_cmd x y)));
   151 
   151 
   152 
   152 
   153 (* theorems *)
   153 (* theorems *)
   154 
   154 
   155 val theorems =
   155 val _ =
   156   Parse_Spec.name_facts -- Parse.for_fixes
   156   Outer_Syntax.local_theory' @{command_keyword lemmas} "define theorems"
   157     >> (fn (facts, fixes) => #2 oo Specification.theorems_cmd Thm.theoremK facts fixes);
   157     (Parse_Spec.name_facts -- Parse.for_fixes >>
   158 
   158       (fn (facts, fixes) => #2 oo Specification.theorems_cmd Thm.theoremK facts fixes));
   159 val _ =
       
   160   Outer_Syntax.local_theory' @{command_keyword theorems} "define theorems" theorems;
       
   161 
       
   162 val _ =
       
   163   Outer_Syntax.local_theory' @{command_keyword lemmas} "define lemmas" theorems;
       
   164 
   159 
   165 val _ =
   160 val _ =
   166   Outer_Syntax.local_theory' @{command_keyword declare} "declare theorems"
   161   Outer_Syntax.local_theory' @{command_keyword declare} "declare theorems"
   167     (Parse.and_list1 Parse.xthms1 -- Parse.for_fixes
   162     (Parse.and_list1 Parse.xthms1 -- Parse.for_fixes
   168       >> (fn (facts, fixes) =>
   163       >> (fn (facts, fixes) =>
   505           Thm.theoremK NONE (K I) a includes elems concl)));
   500           Thm.theoremK NONE (K I) a includes elems concl)));
   506 
   501 
   507 val _ = theorem @{command_keyword theorem} false "theorem";
   502 val _ = theorem @{command_keyword theorem} false "theorem";
   508 val _ = theorem @{command_keyword lemma} false "lemma";
   503 val _ = theorem @{command_keyword lemma} false "lemma";
   509 val _ = theorem @{command_keyword corollary} false "corollary";
   504 val _ = theorem @{command_keyword corollary} false "corollary";
   510 val _ = theorem @{command_keyword schematic_theorem} true "schematic goal";
   505 val _ = theorem @{command_keyword schematic_goal} true "schematic goal";
   511 val _ = theorem @{command_keyword schematic_lemma} true "schematic goal";
       
   512 val _ = theorem @{command_keyword schematic_corollary} true "schematic goal";
       
   513 
   506 
   514 
   507 
   515 val structured_statement =
   508 val structured_statement =
   516   Parse_Spec.statement -- Parse_Spec.cond_statement -- Parse.for_fixes
   509   Parse_Spec.statement -- Parse_Spec.cond_statement -- Parse.for_fixes
   517     >> (fn ((shows, (strict, assumes)), fixes) => (strict, fixes, assumes, shows));
   510     >> (fn ((shows, (strict, assumes)), fixes) => (strict, fixes, assumes, shows));