src/Pure/Isar/isar_syn.ML
changeset 61670 301e0b4ecd45
parent 61669 27ca6147e3b3
child 61671 20d4cd2ceab2
equal deleted inserted replaced
61669:27ca6147e3b3 61670:301e0b4ecd45
   415         Toplevel.theory_to_proof (Interpretation.sublocale_global_cmd loc expr equations)))
   415         Toplevel.theory_to_proof (Interpretation.sublocale_global_cmd loc expr equations)))
   416     || interpretation_args >> (fn (expr, equations) =>
   416     || interpretation_args >> (fn (expr, equations) =>
   417         Toplevel.local_theory_to_proof NONE NONE (Interpretation.sublocale_cmd expr equations)));
   417         Toplevel.local_theory_to_proof NONE NONE (Interpretation.sublocale_cmd expr equations)));
   418 
   418 
   419 val _ =
   419 val _ =
       
   420   Outer_Syntax.local_theory_to_proof @{command_keyword permanent_interpretation}
       
   421     "prove interpretation of locale expression into named theory"
       
   422     (Parse.!!! (Parse_Spec.locale_expression true) --
       
   423       Scan.optional (@{keyword "defining"} |-- Parse.and_list1 (Parse_Spec.opt_thm_name ":"
       
   424         -- ((Parse.binding -- Parse.opt_mixfix') --| @{keyword "="} -- Parse.term))) [] --
       
   425       Scan.optional (Parse.where_ |-- Parse.and_list1 (Parse_Spec.opt_thm_name ":" -- Parse.prop)) []
       
   426       >> (fn ((expr, defs), eqns) => Interpretation.permanent_interpretation_cmd expr defs eqns));
       
   427 
       
   428 val _ =
   420   Outer_Syntax.command @{command_keyword interpretation}
   429   Outer_Syntax.command @{command_keyword interpretation}
   421     "prove interpretation of locale expression in local theory"
   430     "prove interpretation of locale expression in local theory"
   422     (interpretation_args >> (fn (expr, equations) =>
   431     (interpretation_args >> (fn (expr, equations) =>
   423       Toplevel.local_theory_to_proof NONE NONE (Interpretation.interpretation_cmd expr equations)));
   432       Toplevel.local_theory_to_proof NONE NONE (Interpretation.interpretation_cmd expr equations)));
   424 
   433