src/HOL/Tools/Sledgehammer/sledgehammer_provers.ML
changeset 43248 69375eaa9016
parent 43247 4387af606a09
child 43249 6c3a2c33fc39
equal deleted inserted replaced
43247:4387af606a09 43248:69375eaa9016
   181       fold (Integer.max o fst o snd o snd o snd)
   181       fold (Integer.max o fst o snd o snd o snd)
   182            (get_slices slicing (#best_slices (get_atp thy name) ctxt)) 0
   182            (get_slices slicing (#best_slices (get_atp thy name) ctxt)) 0
   183     else (* is_smt_prover ctxt name *)
   183     else (* is_smt_prover ctxt name *)
   184       SMT_Solver.default_max_relevant ctxt name
   184       SMT_Solver.default_max_relevant ctxt name
   185   end
   185   end
   186 
       
   187 (* These are either simplified away by "Meson.presimplify" (most of the time) or
       
   188    handled specially via "fFalse", "fTrue", ..., "fequal". *)
       
   189 val atp_irrelevant_consts =
       
   190   [@{const_name False}, @{const_name True}, @{const_name Not},
       
   191    @{const_name conj}, @{const_name disj}, @{const_name implies},
       
   192    @{const_name HOL.eq}, @{const_name If}, @{const_name Let}]
       
   193 
   186 
   194 fun is_if (@{const_name If}, _) = true
   187 fun is_if (@{const_name If}, _) = true
   195   | is_if _ = false
   188   | is_if _ = false
   196 
   189 
   197 (* Beware of "if and only if" (which is translated as such) and "If" (which is
   190 (* Beware of "if and only if" (which is translated as such) and "If" (which is
   609                 (* pseudo-theorem involving the same constants as the subgoal *)
   602                 (* pseudo-theorem involving the same constants as the subgoal *)
   610                 val subgoal_th =
   603                 val subgoal_th =
   611                   Logic.list_implies (hyp_ts, concl_t)
   604                   Logic.list_implies (hyp_ts, concl_t)
   612                   |> Skip_Proof.make_thm thy
   605                   |> Skip_Proof.make_thm thy
   613               in
   606               in
   614                 Monomorph.monomorph Monomorph.all_schematic_consts_of
   607                 Monomorph.monomorph atp_schematic_consts_of
   615                     (subgoal_th :: map snd facts |> map (pair 0)) ctxt
   608                     (subgoal_th :: map snd facts |> map (pair 0)) ctxt
   616                 |> fst |> tl
   609                 |> fst |> tl
   617                 |> curry ListPair.zip (map fst facts)
   610                 |> curry ListPair.zip (map fst facts)
   618                 |> maps (fn (name, rths) => map (pair name o snd) rths)
   611                 |> maps (fn (name, rths) => map (pair name o snd) rths)
   619               end
   612               end