equal
deleted
inserted
replaced
29 include BASIC_PURE_THY |
29 include BASIC_PURE_THY |
30 val tag_rule: tag -> thm -> thm |
30 val tag_rule: tag -> thm -> thm |
31 val untag_rule: string -> thm -> thm |
31 val untag_rule: string -> thm -> thm |
32 val tag: tag -> attribute |
32 val tag: tag -> attribute |
33 val untag: string -> attribute |
33 val untag: string -> attribute |
|
34 val unknown_name_hint: string |
34 val has_name_hint: thm -> bool |
35 val has_name_hint: thm -> bool |
35 val get_name_hint: thm -> string |
36 val get_name_hint: thm -> string |
36 val put_name_hint: string -> thm -> thm |
37 val put_name_hint: string -> thm -> thm |
37 val get_kind: thm -> string |
38 val get_kind: thm -> string |
38 val kind_rule: string -> thm -> thm |
39 val kind_rule: string -> thm -> thm |
115 fun simple_tag name x = tag (name, []) x; |
116 fun simple_tag name x = tag (name, []) x; |
116 |
117 |
117 |
118 |
118 (* unofficial theorem names *) |
119 (* unofficial theorem names *) |
119 |
120 |
|
121 val unknown_name_hint = "??.unknown"; |
|
122 |
120 fun has_name_hint thm = AList.defined (op =) (Thm.get_tags thm) "name"; |
123 fun has_name_hint thm = AList.defined (op =) (Thm.get_tags thm) "name"; |
121 |
124 |
122 fun get_name_hint thm = |
125 fun get_name_hint thm = |
123 (case AList.lookup (op =) (Thm.get_tags thm) "name" of |
126 (case AList.lookup (op =) (Thm.get_tags thm) "name" of |
124 SOME (k :: _) => k |
127 SOME (k :: _) => k |
125 | _ => "??.unknown"); |
128 | _ => unknown_name_hint); |
126 |
129 |
127 fun put_name_hint name = untag_rule "name" #> tag_rule ("name", [name]); |
130 fun put_name_hint name = untag_rule "name" #> tag_rule ("name", [name]); |
128 |
131 |
129 |
132 |
130 (* theorem kinds *) |
133 (* theorem kinds *) |