src/HOL/Tools/Metis/metis_tactic.ML
changeset 70513 dc749e0dc6b2
parent 70489 12d1e6e2c1d0
child 70514 7a63b16c53c4
equal deleted inserted replaced
70512:06425eaa9cd7 70513:dc749e0dc6b2
   206             val proof = Metis_Proof.proof mth
   206             val proof = Metis_Proof.proof mth
   207             val result = fold (replay_one_inference ctxt' type_enc concealed sym_tab) proof axioms
   207             val result = fold (replay_one_inference ctxt' type_enc concealed sym_tab) proof axioms
   208             val used = map_filter (used_axioms axioms) proof
   208             val used = map_filter (used_axioms axioms) proof
   209             val _ = trace_msg ctxt (K "METIS COMPLETED; clauses actually used:")
   209             val _ = trace_msg ctxt (K "METIS COMPLETED; clauses actually used:")
   210             val _ = List.app (fn th => trace_msg ctxt (fn () => Thm.string_of_thm ctxt th)) used
   210             val _ = List.app (fn th => trace_msg ctxt (fn () => Thm.string_of_thm ctxt th)) used
   211             val (used_th_cls_pairs, unused_th_cls_pairs) =
   211 
   212               List.partition (have_common_thm ctxt used o snd o snd) th_cls_pairs
   212             val unused_th_cls_pairs = filter_out (have_common_thm ctxt used o #2 o #2) th_cls_pairs
   213             val unused_ths = maps (snd o snd) unused_th_cls_pairs
   213             val _ = unused := maps (#2 o #2) unused_th_cls_pairs;
   214             val unused_names = map fst unused_th_cls_pairs
       
   215 
       
   216             val _ = unused := unused_ths;
       
   217             val _ =
   214             val _ =
   218               if not (null unused_names) then
   215               if not (null unused_th_cls_pairs) then
   219                 verbose_warning ctxt ("Unused theorems: " ^ commas_quote unused_names)
   216                 verbose_warning ctxt ("Unused theorems: " ^ commas_quote (map #1 unused_th_cls_pairs))
   220               else ();
   217               else ();
   221             val _ =
   218             val _ =
   222               if not (null cls) andalso not (have_common_thm ctxt used cls) then
   219               if not (null cls) andalso not (have_common_thm ctxt used cls) then
   223                 verbose_warning ctxt "The assumptions are inconsistent"
   220                 verbose_warning ctxt "The assumptions are inconsistent"
   224               else ();
   221               else ();