src/Pure/Isar/rule_cases.ML
changeset 18909 f1333b0ff9e5
parent 18799 f137c5e971f5
child 19012 2577ac76cdc6
equal deleted inserted replaced
18908:fb080097e436 18909:f1333b0ff9e5
   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