33 val multi_thm: Context.generic * Args.T list -> thm list * (Context.generic * Args.T list) |
33 val multi_thm: Context.generic * Args.T list -> thm list * (Context.generic * Args.T list) |
34 val syntax: (Context.generic * Args.T list -> |
34 val syntax: (Context.generic * Args.T list -> |
35 attribute * (Context.generic * Args.T list)) -> src -> attribute |
35 attribute * (Context.generic * Args.T list)) -> src -> attribute |
36 val no_args: attribute -> src -> attribute |
36 val no_args: attribute -> src -> attribute |
37 val add_del_args: attribute -> attribute -> src -> attribute |
37 val add_del_args: attribute -> attribute -> src -> attribute |
38 val kind: string -> src |
|
39 val kind_theorem: src |
|
40 val kind_lemma: src |
|
41 val kind_corollary: src |
|
42 val kind_internal: src |
|
43 val internal: attribute -> src |
38 val internal: attribute -> src |
44 end; |
39 end; |
45 |
40 |
46 structure Attrib: ATTRIB = |
41 structure Attrib: ATTRIB = |
47 struct |
42 struct |
205 (* tags *) |
200 (* tags *) |
206 |
201 |
207 fun tagged x = syntax (tag >> PureThy.tag) x; |
202 fun tagged x = syntax (tag >> PureThy.tag) x; |
208 fun untagged x = syntax (Scan.lift Args.name >> PureThy.untag) x; |
203 fun untagged x = syntax (Scan.lift Args.name >> PureThy.untag) x; |
209 |
204 |
210 |
205 fun kind x = syntax (Scan.lift Args.name >> PureThy.kind) x; |
211 (* kinds *) |
|
212 |
|
213 fun kind_att x = syntax (Scan.lift Args.name >> PureThy.kind) x; |
|
214 fun kind name = Args.src (("Pure.kind", [Args.mk_string (name, Position.none)]), Position.none); |
|
215 |
|
216 val kind_theorem = kind PureThy.theoremK; |
|
217 val kind_lemma = kind PureThy.lemmaK; |
|
218 val kind_corollary = kind PureThy.corollaryK; |
|
219 val kind_internal = kind PureThy.internalK; |
|
220 |
206 |
221 |
207 |
222 (* rule composition *) |
208 (* rule composition *) |
223 |
209 |
224 val COMP_att = |
210 val COMP_att = |
288 |
274 |
289 val _ = Context.add_setup |
275 val _ = Context.add_setup |
290 (add_attributes |
276 (add_attributes |
291 [("tagged", tagged, "tagged theorem"), |
277 [("tagged", tagged, "tagged theorem"), |
292 ("untagged", untagged, "untagged theorem"), |
278 ("untagged", untagged, "untagged theorem"), |
293 ("kind", kind_att, "theorem kind"), |
279 ("kind", kind, "theorem kind"), |
294 ("COMP", COMP_att, "direct composition with rules (no lifting)"), |
280 ("COMP", COMP_att, "direct composition with rules (no lifting)"), |
295 ("THEN", THEN_att, "resolution with rule"), |
281 ("THEN", THEN_att, "resolution with rule"), |
296 ("OF", OF_att, "rule applied to facts"), |
282 ("OF", OF_att, "rule applied to facts"), |
297 ("rename_abs", rename_abs, "rename bound variables in abstractions"), |
283 ("rename_abs", rename_abs, "rename bound variables in abstractions"), |
298 ("unfolded", unfolded, "unfolded definitions"), |
284 ("unfolded", unfolded, "unfolded definitions"), |