src/HOL/Tools/ATP/atp_problem.ML
changeset 42974 347d5197896e
parent 42968 74415622d293
child 42994 fe291ab75eb5
equal deleted inserted replaced
42973:6b39a2098ffd 42974:347d5197896e
   195          string_for_type format (ty |> the_default (AType tptp_individual_type))
   195          string_for_type format (ty |> the_default (AType tptp_individual_type))
   196        else
   196        else
   197          "")
   197          "")
   198 
   198 
   199 fun string_for_formula format (AQuant (q, xs, phi)) =
   199 fun string_for_formula format (AQuant (q, xs, phi)) =
   200     "(" ^ string_for_quantifier q ^
   200     string_for_quantifier q ^
   201     "[" ^ commas (map (string_for_bound_var format) xs) ^ "] : " ^
   201     "[" ^ commas (map (string_for_bound_var format) xs) ^ "] : " ^
   202     string_for_formula format phi ^ ")"
   202     string_for_formula format phi
       
   203     |> enclose "(" ")"
   203   | string_for_formula format (AConn (ANot, [AAtom (ATerm ("equal", ts))])) =
   204   | string_for_formula format (AConn (ANot, [AAtom (ATerm ("equal", ts))])) =
   204     space_implode (" " ^ tptp_not_infix ^ tptp_equal ^ " ")
   205     space_implode (" " ^ tptp_not_infix ^ tptp_equal ^ " ")
   205                   (map (string_for_term format) ts)
   206                   (map (string_for_term format) ts)
   206     |> format = THF ? enclose "(" ")"
   207     |> format = THF ? enclose "(" ")"
   207   | string_for_formula format (AConn (c, [phi])) =
   208   | string_for_formula format (AConn (c, [phi])) =
   208     "(" ^ string_for_connective c ^ " " ^ string_for_formula format phi ^ ")"
   209     string_for_connective c ^ " " ^
       
   210     (string_for_formula format phi |> format = THF ? enclose "(" ")")
       
   211     |> enclose "(" ")"
   209   | string_for_formula format (AConn (c, phis)) =
   212   | string_for_formula format (AConn (c, phis)) =
   210     "(" ^ space_implode (" " ^ string_for_connective c ^ " ")
   213     space_implode (" " ^ string_for_connective c ^ " ")
   211                         (map (string_for_formula format) phis) ^ ")"
   214                   (map (string_for_formula format) phis)
       
   215     |> enclose "(" ")"
   212   | string_for_formula format (AAtom tm) = string_for_term format tm
   216   | string_for_formula format (AAtom tm) = string_for_term format tm
   213 
   217 
   214 val default_source =
   218 val default_source =
   215   ATerm ("inference", ATerm ("isabelle", []) :: replicate 2 (ATerm ("[]", [])))
   219   ATerm ("inference", ATerm ("isabelle", []) :: replicate 2 (ATerm ("[]", [])))
   216 
   220