src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML
changeset 48400 f08425165cca
parent 48399 4bacc8983b3d
child 48405 7682bc885e8a
equal deleted inserted replaced
48399:4bacc8983b3d 48400:f08425165cca
   165          else if can (trans_lams_from_string ctxt any_type_enc) name andalso
   165          else if can (trans_lams_from_string ctxt any_type_enc) name andalso
   166                  null value then
   166                  null value then
   167            ("lam_trans", [name])
   167            ("lam_trans", [name])
   168          else if member (op =) fact_filters name then
   168          else if member (op =) fact_filters name then
   169            ("fact_filter", [name])
   169            ("fact_filter", [name])
   170          else case Int.fromString name of
   170          else if can Int.fromString name then
   171            SOME n => ("max_facts", [name])
   171            ("max_facts", [name])
   172          | NONE => error ("Unknown parameter: " ^ quote name ^ "."))
   172          else
       
   173            error ("Unknown parameter: " ^ quote name ^ "."))
   173 
   174 
   174 
   175 
   175 (* Ensures that type encodings such as "mono_native?" and "poly_guards!!" are
   176 (* Ensures that type encodings such as "mono_native?" and "poly_guards!!" are
   176    read correctly. *)
   177    read correctly. *)
   177 val implode_param = strip_spaces_except_between_idents o space_implode " "
   178 val implode_param = strip_spaces_except_between_idents o space_implode " "
   373       end
   374       end
   374     else if subcommand = minN then
   375     else if subcommand = minN then
   375       let
   376       let
   376         val ctxt = ctxt |> Config.put instantiate_inducts false
   377         val ctxt = ctxt |> Config.put instantiate_inducts false
   377         val i = the_default 1 opt_i
   378         val i = the_default 1 opt_i
   378         val params as {provers, ...} =
   379         val params =
   379           get_params Minimize ctxt (("provers", [default_minimize_prover]) ::
   380           get_params Minimize ctxt (("provers", [default_minimize_prover]) ::
   380                                     override_params)
   381                                     override_params)
   381         val goal = prop_of (#goal (Proof.goal state))
   382         val goal = prop_of (#goal (Proof.goal state))
   382         val facts = nearly_all_facts ctxt false fact_override Symtab.empty
   383         val facts = nearly_all_facts ctxt false fact_override Symtab.empty
   383                                      Termtab.empty [] [] goal
   384                                      Termtab.empty [] [] goal