src/HOL/Tools/ATP/atp_problem_generate.ML
changeset 47776 024cf0f7fb6d
parent 47769 249a940953b0
child 47786 034cc7cc8b4a
equal deleted inserted replaced
47775:ccb1d4874f63 47776:024cf0f7fb6d
  1255   in
  1255   in
  1256     {name = name, stature = stature, kind = kind, iformula = iformula,
  1256     {name = name, stature = stature, kind = kind, iformula = iformula,
  1257      atomic_types = atomic_Ts}
  1257      atomic_types = atomic_Ts}
  1258   end
  1258   end
  1259 
  1259 
       
  1260 (* Satallax prefers "=" to "<=>" *)
       
  1261 fun is_format_eq_as_iff FOF = true
       
  1262   | is_format_eq_as_iff (TFF _) = true
       
  1263   | is_format_eq_as_iff (DFG _) = true
       
  1264   | is_format_eq_as_iff _ = false
       
  1265 
  1260 fun make_fact ctxt format type_enc eq_as_iff ((name, stature), t) =
  1266 fun make_fact ctxt format type_enc eq_as_iff ((name, stature), t) =
  1261   case t |> make_formula ctxt type_enc (eq_as_iff andalso format <> CNF) name
  1267   case t |> make_formula ctxt type_enc
       
  1268                          (eq_as_iff andalso is_format_eq_as_iff format) name
  1262                          stature Axiom of
  1269                          stature Axiom of
  1263     formula as {iformula = AAtom (IConst ((s, _), _, _)), ...} =>
  1270     formula as {iformula = AAtom (IConst ((s, _), _, _)), ...} =>
  1264     if s = tptp_true then NONE else SOME formula
  1271     if s = tptp_true then NONE else SOME formula
  1265   | formula => SOME formula
  1272   | formula => SOME formula
  1266 
  1273 
  1272 *)
  1279 *)
  1273 
  1280 
  1274 fun make_conjecture ctxt format type_enc =
  1281 fun make_conjecture ctxt format type_enc =
  1275   map (fn ((name, stature), (kind, t)) =>
  1282   map (fn ((name, stature), (kind, t)) =>
  1276           t |> kind = Conjecture ? s_not
  1283           t |> kind = Conjecture ? s_not
  1277             |> make_formula ctxt type_enc (format <> CNF) name stature kind)
  1284             |> make_formula ctxt type_enc (is_format_eq_as_iff format) name
       
  1285                             stature kind)
  1278 
  1286 
  1279 (** Finite and infinite type inference **)
  1287 (** Finite and infinite type inference **)
  1280 
  1288 
  1281 fun tvar_footprint thy s ary =
  1289 fun tvar_footprint thy s ary =
  1282   (case unprefix_and_unascii const_prefix s of
  1290   (case unprefix_and_unascii const_prefix s of