src/HOL/Tools/Sledgehammer/metis_tactics.ML
changeset 36230 43d10a494c91
parent 36170 0cdb76723c88
child 36383 6adf1068ac0f
equal deleted inserted replaced
36229:c95fab3f9cc5 36230:43d10a494c91
   691                 val _ = trace_msg (fn () => "METIS COMPLETED...clauses actually used:")
   691                 val _ = trace_msg (fn () => "METIS COMPLETED...clauses actually used:")
   692                 val _ = app (fn th => trace_msg (fn () => Display.string_of_thm ctxt th)) used
   692                 val _ = app (fn th => trace_msg (fn () => Display.string_of_thm ctxt th)) used
   693                 val unused = th_cls_pairs |> map_filter (fn (name, cls) =>
   693                 val unused = th_cls_pairs |> map_filter (fn (name, cls) =>
   694                   if common_thm used cls then NONE else SOME name)
   694                   if common_thm used cls then NONE else SOME name)
   695             in
   695             in
   696                 if null unused then ()
   696                 if not (common_thm used cls) then
   697                 else warning ("Metis: unused theorems " ^ commas_quote unused);
   697                   warning "Metis: The goal is provable because the context is \
       
   698                           \inconsistent."
       
   699                 else if not (null unused) then
       
   700                   warning ("Metis: Unused theorems: " ^ commas_quote unused
       
   701                            ^ ".")
       
   702                 else
       
   703                   ();
   698                 case result of
   704                 case result of
   699                     (_,ith)::_ =>
   705                     (_,ith)::_ =>
   700                         (trace_msg (fn () => "success: " ^ Display.string_of_thm ctxt ith);
   706                         (trace_msg (fn () => "Success: " ^ Display.string_of_thm ctxt ith);
   701                          [ith])
   707                          [ith])
   702                   | _ => (trace_msg (fn () => "Metis: no result");
   708                   | _ => (trace_msg (fn () => "Metis: No result");
   703                           [])
   709                           [])
   704             end
   710             end
   705         | Metis.Resolution.Satisfiable _ =>
   711         | Metis.Resolution.Satisfiable _ =>
   706             (trace_msg (fn () => "Metis: No first-order proof with the lemmas supplied");
   712             (trace_msg (fn () => "Metis: No first-order proof with the lemmas supplied");
   707              [])
   713              [])