equal
deleted
inserted
replaced
224 fun get_consumes th = the_default 0 (lookup_consumes th); |
224 fun get_consumes th = the_default 0 (lookup_consumes th); |
225 |
225 |
226 fun put_consumes NONE th = th |
226 fun put_consumes NONE th = th |
227 | put_consumes (SOME n) th = th |
227 | put_consumes (SOME n) th = th |
228 |> PureThy.untag_rule consumes_tagN |
228 |> PureThy.untag_rule consumes_tagN |
229 |> PureThy.tag_rule (consumes_tagN, [Library.string_of_int n]); |
229 |> PureThy.tag_rule |
|
230 (consumes_tagN, [Library.string_of_int (if n < 0 then Thm.nprems_of th + n else n)]); |
230 |
231 |
231 fun add_consumes k th = put_consumes (SOME (k + get_consumes th)) th; |
232 fun add_consumes k th = put_consumes (SOME (k + get_consumes th)) th; |
232 |
233 |
233 val save_consumes = put_consumes o lookup_consumes; |
234 val save_consumes = put_consumes o lookup_consumes; |
234 |
235 |