src/HOL/Tools/ATP/atp_problem_generate.ML
changeset 46639 d0ef1d1562d7
parent 46450 7560930b2e06
child 46642 37a055f37224
equal deleted inserted replaced
46638:fc315796794e 46639:d0ef1d1562d7
  1462                                     sym_tab
  1462                                     sym_tab
  1463                     end
  1463                     end
  1464                   | NONE =>
  1464                   | NONE =>
  1465                     let
  1465                     let
  1466                       val pred_sym = top_level andalso not bool_vars
  1466                       val pred_sym = top_level andalso not bool_vars
       
  1467                       val ary =
       
  1468                         case unprefix_and_unascii const_prefix s of
       
  1469                           SOME s =>
       
  1470                           if not (String.isSubstring uncurried_alias_sep s)
       
  1471                              andalso (s |> unmangled_const_name |> hd
       
  1472                                         |> invert_const) = @{const_name If} then
       
  1473                             Integer.min ary 3
       
  1474                           else
       
  1475                             ary
       
  1476                         | NONE => ary
  1467                       val min_ary =
  1477                       val min_ary =
  1468                         case app_op_level of
  1478                         case app_op_level of
  1469                           Incomplete_Apply => ary
  1479                           Incomplete_Apply => ary
  1470                         | Sufficient_Apply =>
  1480                         | Sufficient_Apply =>
  1471                           fold (consider_var_ary T) fun_var_Ts ary
  1481                           fold (consider_var_ary T) fun_var_Ts ary
  1543         case head of
  1553         case head of
  1544           IConst (name as (s, _), T, T_args) =>
  1554           IConst (name as (s, _), T, T_args) =>
  1545           if uncurried_aliases andalso String.isPrefix const_prefix s then
  1555           if uncurried_aliases andalso String.isPrefix const_prefix s then
  1546             let
  1556             let
  1547               val ary = length args
  1557               val ary = length args
  1548               val name = name |> ary > min_ary_of sym_tab s
  1558               val name =
  1549                                  ? aliased_uncurried ary
  1559                 name |> ary > min_ary_of sym_tab s ? aliased_uncurried ary
  1550             in list_app (IConst (name, T, T_args)) args end
  1560             in list_app (IConst (name, T, T_args)) args end
  1551           else
  1561           else
  1552             args |> chop (min_ary_of sym_tab s)
  1562             args |> chop (min_ary_of sym_tab s)
  1553                  |>> list_app head |-> list_app_ops
  1563                  |>> list_app head |-> list_app_ops
  1554         | _ => list_app_ops head args
  1564         | _ => list_app_ops head args