equal
deleted
inserted
replaced
167 |
167 |
168 |
168 |
169 |
169 |
170 (** defived definitions **) |
170 (** defived definitions **) |
171 |
171 |
172 (* transformation rules *) |
172 (* transformation via rewrite rules *) |
173 |
173 |
174 structure Rules = Generic_Data |
174 structure Rules = Generic_Data |
175 ( |
175 ( |
176 type T = thm list; |
176 type T = thm list; |
177 val empty = []; |
177 val empty = []; |
178 val extend = I; |
178 val extend = I; |
179 val merge = Thm.merge_thms; |
179 val merge = Thm.merge_thms; |
180 ); |
180 ); |
181 |
181 |
182 fun print_rules ctxt = |
182 fun print_rules ctxt = |
183 Pretty.writeln (Pretty.big_list "definitional transformations:" |
183 Pretty.writeln (Pretty.big_list "definitional rewrite rules:" |
184 (map (Display.pretty_thm_item ctxt) (Rules.get (Context.Proof ctxt)))); |
184 (map (Display.pretty_thm_item ctxt) (Rules.get (Context.Proof ctxt)))); |
185 |
185 |
186 val defn_add = Thm.declaration_attribute (Rules.map o Thm.add_thm); |
186 val defn_add = Thm.declaration_attribute (Rules.map o Thm.add_thm); |
187 val defn_del = Thm.declaration_attribute (Rules.map o Thm.del_thm); |
187 val defn_del = Thm.declaration_attribute (Rules.map o Thm.del_thm); |
188 |
188 |