src/HOL/Tools/Sledgehammer/sledgehammer_atp_translate.ML
changeset 42566 299d4266a9f9
parent 42565 93f58e6a6f3e
child 42568 7b9801a34836
equal deleted inserted replaced
42565:93f58e6a6f3e 42566:299d4266a9f9
   386       val thy = Proof_Context.theory_of ctxt
   386       val thy = Proof_Context.theory_of ctxt
   387       val unmangled_s = mangled_s |> unmangled_const_name
   387       val unmangled_s = mangled_s |> unmangled_const_name
   388       fun dub_and_inst c needs_full_types (th, j) =
   388       fun dub_and_inst c needs_full_types (th, j) =
   389         ((c ^ "_" ^ string_of_int j ^ (if needs_full_types then "ft" else ""),
   389         ((c ^ "_" ^ string_of_int j ^ (if needs_full_types then "ft" else ""),
   390           false),
   390           false),
   391          th |> prop_of
   391          let val t = th |> prop_of in
   392             |> general_type_arg_policy type_sys = Mangled_Types
   392            t |> (general_type_arg_policy type_sys = Mangled_Types andalso
   393                ? (case typ of
   393                  not (null (Term.hidden_polymorphism t)))
   394                     SOME T =>
   394                 ? (case typ of
   395                     specialize_type thy (safe_invert_const unmangled_s, T)
   395                      SOME T =>
   396                   | NONE => I))
   396                      specialize_type thy (safe_invert_const unmangled_s, T)
       
   397                    | NONE => I)
       
   398          end)
   397       fun make_facts eq_as_iff =
   399       fun make_facts eq_as_iff =
   398         map_filter (make_fact ctxt false eq_as_iff false)
   400         map_filter (make_fact ctxt false eq_as_iff false)
   399     in
   401     in
   400       metis_helpers
   402       metis_helpers
   401       |> maps (fn (metis_s, (needs_full_types, ths)) =>
   403       |> maps (fn (metis_s, (needs_full_types, ths)) =>