src/HOL/Tools/ATP/atp_problem_generate.ML
changeset 54089 b13f6731f873
parent 53586 bd5fa6425993
child 54109 80660c529d74
equal deleted inserted replaced
54088:40366d99fa39 54089:b13f6731f873
    89   val unproxify_const : string -> string
    89   val unproxify_const : string -> string
    90   val new_skolem_var_name_of_const : string -> string
    90   val new_skolem_var_name_of_const : string -> string
    91   val atp_logical_consts : string list
    91   val atp_logical_consts : string list
    92   val atp_irrelevant_consts : string list
    92   val atp_irrelevant_consts : string list
    93   val atp_widely_irrelevant_consts : string list
    93   val atp_widely_irrelevant_consts : string list
       
    94   val is_irrelevant_const : string -> bool
       
    95   val is_widely_irrelevant_const : string -> bool
    94   val atp_schematic_consts_of : term -> typ list Symtab.table
    96   val atp_schematic_consts_of : term -> typ list Symtab.table
    95   val is_type_enc_higher_order : type_enc -> bool
    97   val is_type_enc_higher_order : type_enc -> bool
    96   val is_type_enc_polymorphic : type_enc -> bool
    98   val is_type_enc_polymorphic : type_enc -> bool
    97   val level_of_type_enc : type_enc -> type_level
    99   val level_of_type_enc : type_enc -> type_level
    98   val is_type_enc_sound : type_enc -> bool
   100   val is_type_enc_sound : type_enc -> bool
   403   end
   405   end
   404 
   406 
   405 (* These are ignored anyway by the relevance filter (unless they appear in
   407 (* These are ignored anyway by the relevance filter (unless they appear in
   406    higher-order places) but not by the monomorphizer. *)
   408    higher-order places) but not by the monomorphizer. *)
   407 val atp_logical_consts =
   409 val atp_logical_consts =
   408   [@{const_name all}, @{const_name "==>"}, @{const_name "=="},
   410   [@{const_name prop}, @{const_name Pure.conjunction}, @{const_name all}, @{const_name "==>"},
   409    @{const_name Trueprop}, @{const_name All}, @{const_name Ex},
   411    @{const_name "=="}, @{const_name Trueprop}, @{const_name All}, @{const_name Ex},
   410    @{const_name Ex1}, @{const_name Ball}, @{const_name Bex}]
   412    @{const_name Ex1}, @{const_name Ball}, @{const_name Bex}]
   411 
   413 
   412 (* These are either simplified away by "Meson.presimplify" (most of the time) or
   414 (* These are either simplified away by "Meson.presimplify" (most of the time) or
   413    handled specially via "fFalse", "fTrue", ..., "fequal". *)
   415    handled specially via "fFalse", "fTrue", ..., "fequal". *)
   414 val atp_irrelevant_consts =
   416 val atp_irrelevant_consts =
   415   [@{const_name False}, @{const_name True}, @{const_name Not},
   417   [@{const_name False}, @{const_name True}, @{const_name Not}, @{const_name conj},
   416    @{const_name conj}, @{const_name disj}, @{const_name implies},
   418    @{const_name disj}, @{const_name implies}, @{const_name HOL.eq}, @{const_name If},
   417    @{const_name HOL.eq}, @{const_name If}, @{const_name Let}]
   419    @{const_name Let}]
   418 
   420 
   419 val atp_widely_irrelevant_consts = atp_logical_consts @ atp_irrelevant_consts
   421 val atp_widely_irrelevant_consts = atp_logical_consts @ atp_irrelevant_consts
       
   422 
       
   423 val atp_irrelevant_const_tab = Symtab.make (map (rpair ()) atp_irrelevant_consts)
       
   424 val atp_widely_irrelevant_const_tab = Symtab.make (map (rpair ()) atp_widely_irrelevant_consts)
       
   425 
       
   426 val is_irrelevant_const = Symtab.defined atp_irrelevant_const_tab
       
   427 val is_widely_irrelevant_const = Symtab.defined atp_widely_irrelevant_const_tab
   420 
   428 
   421 fun add_schematic_const (x as (_, T)) =
   429 fun add_schematic_const (x as (_, T)) =
   422   Monomorph.typ_has_tvars T ? Symtab.insert_list (op =) x
   430   Monomorph.typ_has_tvars T ? Symtab.insert_list (op =) x
   423 val add_schematic_consts_of =
   431 val add_schematic_consts_of =
   424   Term.fold_aterms (fn Const (x as (s, _)) =>
   432   Term.fold_aterms (fn Const (x as (s, _)) =>