src/Tools/interpretation_with_defs.ML
changeset 46949 94aa7b81bcf6
parent 46947 b8c7eb0c2f89
child 46961 5c6955f487e5
equal deleted inserted replaced
46948:aae5566d6756 46949:94aa7b81bcf6
    81 
    81 
    82 val _ =
    82 val _ =
    83   Outer_Syntax.command "interpretation"
    83   Outer_Syntax.command "interpretation"
    84     "prove interpretation of locale expression in theory" Keyword.thy_goal
    84     "prove interpretation of locale expression in theory" Keyword.thy_goal
    85     (Parse.!!! (Parse_Spec.locale_expression true) --
    85     (Parse.!!! (Parse_Spec.locale_expression true) --
    86       Scan.optional (Parse.$$$ "defines" |-- Parse.and_list1 (Parse_Spec.opt_thm_name ":"
    86       Scan.optional (@{keyword "defines"} |-- Parse.and_list1 (Parse_Spec.opt_thm_name ":"
    87         -- ((Parse.binding -- Parse.opt_mixfix') --| Parse.$$$ "is" -- Parse.term))) [] --
    87         -- ((Parse.binding -- Parse.opt_mixfix') --| @{keyword "is"} -- Parse.term))) [] --
    88       Scan.optional (Parse.where_ |-- Parse.and_list1 (Parse_Spec.opt_thm_name ":" -- Parse.prop)) []
    88       Scan.optional (Parse.where_ |-- Parse.and_list1 (Parse_Spec.opt_thm_name ":" -- Parse.prop)) []
    89       >> (fn ((expr, defs), equations) => Toplevel.print o
    89       >> (fn ((expr, defs), equations) => Toplevel.print o
    90           Toplevel.theory_to_proof (interpretation_cmd expr defs equations)));
    90           Toplevel.theory_to_proof (interpretation_cmd expr defs equations)));
    91 
    91 
    92 end;
    92 end;