tuned Sledgehammer's TPTP generation
authordesharna
Wed, 12 Feb 2025 08:47:44 +0100
changeset 82135 08475a3360a8
parent 82131 7d89e4f10ffe
child 82136 b97cea26d3a3
tuned Sledgehammer's TPTP generation Some provers, such as E 3.1 and 3.2, fail to parse != without parentheses.
src/HOL/Tools/ATP/atp_problem.ML
--- a/src/HOL/Tools/ATP/atp_problem.ML	Mon Feb 10 10:52:55 2025 +0100
+++ b/src/HOL/Tools/ATP/atp_problem.ML	Wed Feb 12 08:47:44 2025 +0100
@@ -569,12 +569,10 @@
     |> parens
   | tptp_string_of_formula format
         (AConn (ANot, [AAtom (ATerm (("=" (* tptp_equal *), []), ts))])) =
-    space_implode (" " ^ tptp_not_equal ^ " ") (map (tptp_string_of_term format) ts)
-    |> is_format_higher_order format ? parens
+    parens (space_implode (" " ^ tptp_not_equal ^ " ") (map (tptp_string_of_term format) ts))
   | tptp_string_of_formula format
         (AConn (ANot, [AAtom (ATerm (("equal" (* tptp_old_equal *), []), ts))])) =
-    space_implode (" " ^ tptp_not_equal ^ " ") (map (tptp_string_of_term format) ts)
-    |> is_format_higher_order format ? parens
+    parens (space_implode (" " ^ tptp_not_equal ^ " ") (map (tptp_string_of_term format) ts))
   | tptp_string_of_formula format (AConn (c, [phi])) =
     tptp_string_of_connective c ^ " " ^ (tptp_string_of_formula format phi |> parens)
     |> parens