equal
deleted
inserted
replaced
270 OuterSyntax.local_theory "lemmas" "define lemmas" K.thy_decl (theorems Thm.lemmaK); |
270 OuterSyntax.local_theory "lemmas" "define lemmas" K.thy_decl (theorems Thm.lemmaK); |
271 |
271 |
272 val _ = |
272 val _ = |
273 OuterSyntax.local_theory "declare" "declare theorems (improper)" K.thy_decl |
273 OuterSyntax.local_theory "declare" "declare theorems (improper)" K.thy_decl |
274 (P.and_list1 SpecParse.xthms1 |
274 (P.and_list1 SpecParse.xthms1 |
275 >> (fn args => #2 o Specification.theorems_cmd "" [((Name.no_binding, []), flat args)])); |
275 >> (fn args => #2 o Specification.theorems_cmd "" [(Attrib.no_binding, flat args)])); |
276 |
276 |
277 |
277 |
278 (* name space entry path *) |
278 (* name space entry path *) |
279 |
279 |
280 val _ = |
280 val _ = |
466 (* statements *) |
466 (* statements *) |
467 |
467 |
468 fun gen_theorem kind = |
468 fun gen_theorem kind = |
469 OuterSyntax.local_theory_to_proof' kind ("state " ^ kind) K.thy_goal |
469 OuterSyntax.local_theory_to_proof' kind ("state " ^ kind) K.thy_goal |
470 (Scan.optional (SpecParse.opt_thm_name ":" --| |
470 (Scan.optional (SpecParse.opt_thm_name ":" --| |
471 Scan.ahead (SpecParse.locale_keyword || SpecParse.statement_keyword)) (Name.no_binding, []) -- |
471 Scan.ahead (SpecParse.locale_keyword || SpecParse.statement_keyword)) Attrib.no_binding -- |
472 SpecParse.general_statement >> (fn (a, (elems, concl)) => |
472 SpecParse.general_statement >> (fn (a, (elems, concl)) => |
473 (Specification.theorem_cmd kind NONE (K I) a elems concl))); |
473 (Specification.theorem_cmd kind NONE (K I) a elems concl))); |
474 |
474 |
475 val _ = gen_theorem Thm.theoremK; |
475 val _ = gen_theorem Thm.theoremK; |
476 val _ = gen_theorem Thm.lemmaK; |
476 val _ = gen_theorem Thm.lemmaK; |