src/HOL/Tools/Sledgehammer/sledgehammer_minimize.ML
changeset 43004 20e9caff1f86
parent 42740 31334a7b109d
child 43011 5f8d74d3b297
equal deleted inserted replaced
43003:5a86009366fc 43004:20e9caff1f86
    45 fun test_facts ({debug, verbose, overlord, provers, max_mono_iters,
    45 fun test_facts ({debug, verbose, overlord, provers, max_mono_iters,
    46                  max_new_mono_instances, type_sys, isar_proof,
    46                  max_new_mono_instances, type_sys, isar_proof,
    47                  isar_shrink_factor, ...} : params)
    47                  isar_shrink_factor, ...} : params)
    48         explicit_apply_opt silent (prover : prover) timeout i n state facts =
    48         explicit_apply_opt silent (prover : prover) timeout i n state facts =
    49   let
    49   let
       
    50     val ctxt = Proof.context_of state
    50     val thy = Proof.theory_of state
    51     val thy = Proof.theory_of state
    51     val _ =
    52     val _ =
    52       print silent (fn () =>
    53       print silent (fn () =>
    53           "Testing " ^ n_facts (map fst facts) ^
    54           "Testing " ^ n_facts (map fst facts) ^
    54           (if verbose then " (timeout: " ^ string_from_time timeout ^ ")"
    55           (if verbose then " (timeout: " ^ string_from_time timeout ^ ")"
    56     val {goal, ...} = Proof.goal state
    57     val {goal, ...} = Proof.goal state
    57     val explicit_apply =
    58     val explicit_apply =
    58       case explicit_apply_opt of
    59       case explicit_apply_opt of
    59         SOME explicit_apply => explicit_apply
    60         SOME explicit_apply => explicit_apply
    60       | NONE =>
    61       | NONE =>
    61         let val (_, hyp_ts, concl_t) = strip_subgoal goal i in
    62         let val (_, hyp_ts, concl_t) = strip_subgoal ctxt goal i in
    62           not (forall (Meson.is_fol_term thy)
    63           not (forall (Meson.is_fol_term thy)
    63                       (concl_t :: hyp_ts @ maps (map prop_of o snd) facts))
    64                       (concl_t :: hyp_ts @ maps (map prop_of o snd) facts))
    64         end
    65         end
    65     val params =
    66     val params =
    66       {debug = debug, verbose = verbose, overlord = overlord, blocking = true,
    67       {debug = debug, verbose = verbose, overlord = overlord, blocking = true,