src/HOL/Tools/Sledgehammer/sledgehammer_compress.ML
changeset 52049 156e12d5cb92
parent 51998 f732a674db1b
child 52453 2cba5906d836
equal deleted inserted replaced
52048:9003b293e775 52049:156e12d5cb92
    40 (* Queue interface to table *)
    40 (* Queue interface to table *)
    41 fun pop tab key =
    41 fun pop tab key =
    42   (let val v = hd (Inttab.lookup_list tab key) in
    42   (let val v = hd (Inttab.lookup_list tab key) in
    43     (v, Inttab.remove_list (op =) (key, v) tab)
    43     (v, Inttab.remove_list (op =) (key, v) tab)
    44   end) handle List.Empty => raise Fail "sledgehammer_compress: pop"
    44   end) handle List.Empty => raise Fail "sledgehammer_compress: pop"
    45 fun pop_max tab = pop tab (the (Inttab.max_key tab))
    45 fun pop_max tab = pop tab (fst (the (Inttab.max tab)))
    46   handle Option.Option => raise Fail "sledgehammer_compress: pop_max"
    46   handle Option.Option => raise Fail "sledgehammer_compress: pop_max"
    47 fun add_list tab xs = fold (Inttab.insert_list (op =)) xs tab
    47 fun add_list tab xs = fold (Inttab.insert_list (op =)) xs tab
    48 
    48 
    49 (* Main function for compresing proofs *)
    49 (* Main function for compresing proofs *)
    50 fun compress_and_preplay_proof debug ctxt type_enc lam_trans preplay
    50 fun compress_and_preplay_proof debug ctxt type_enc lam_trans preplay