equal
deleted
inserted
replaced
237 |
237 |
238 fun theorems kind = P.opt_locale_target -- P.name_facts |
238 fun theorems kind = P.opt_locale_target -- P.name_facts |
239 >> (fn (loc, args) => Toplevel.local_theory loc (#2 o Specification.theorems kind args)); |
239 >> (fn (loc, args) => Toplevel.local_theory loc (#2 o Specification.theorems kind args)); |
240 |
240 |
241 val theoremsP = |
241 val theoremsP = |
242 OuterSyntax.command "theorems" "define theorems" K.thy_decl (theorems PureThy.theoremK); |
242 OuterSyntax.command "theorems" "define theorems" K.thy_decl (theorems Thm.theoremK); |
243 |
243 |
244 val lemmasP = |
244 val lemmasP = |
245 OuterSyntax.command "lemmas" "define lemmas" K.thy_decl (theorems PureThy.lemmaK); |
245 OuterSyntax.command "lemmas" "define lemmas" K.thy_decl (theorems Thm.lemmaK); |
246 |
246 |
247 val declareP = |
247 val declareP = |
248 OuterSyntax.command "declare" "declare theorems (improper)" K.thy_script |
248 OuterSyntax.command "declare" "declare theorems (improper)" K.thy_script |
249 (P.opt_locale_target -- (P.and_list1 P.xthms1 >> flat) |
249 (P.opt_locale_target -- (P.and_list1 P.xthms1 >> flat) |
250 >> (fn (loc, args) => Toplevel.local_theory loc |
250 >> (fn (loc, args) => Toplevel.local_theory loc |
390 P.general_statement >> (fn ((loc, a), (elems, concl)) => |
390 P.general_statement >> (fn ((loc, a), (elems, concl)) => |
391 (Toplevel.print o |
391 (Toplevel.print o |
392 Toplevel.local_theory_to_proof loc |
392 Toplevel.local_theory_to_proof loc |
393 (Specification.theorem kind NONE (K I) a elems concl)))); |
393 (Specification.theorem kind NONE (K I) a elems concl)))); |
394 |
394 |
395 val theoremP = gen_theorem PureThy.theoremK; |
395 val theoremP = gen_theorem Thm.theoremK; |
396 val lemmaP = gen_theorem PureThy.lemmaK; |
396 val lemmaP = gen_theorem Thm.lemmaK; |
397 val corollaryP = gen_theorem PureThy.corollaryK; |
397 val corollaryP = gen_theorem Thm.corollaryK; |
398 |
398 |
399 val haveP = |
399 val haveP = |
400 OuterSyntax.command "have" "state local goal" |
400 OuterSyntax.command "have" "state local goal" |
401 (K.tag_proof K.prf_goal) |
401 (K.tag_proof K.prf_goal) |
402 (P.statement >> ((Toplevel.print oo Toplevel.proof') o IsarCmd.have)); |
402 (P.statement >> ((Toplevel.print oo Toplevel.proof') o IsarCmd.have)); |