src/HOL/Tools/Metis/metis_reconstruct.ML
changeset 40264 b91e2e16d994
parent 40261 7a02144874f3
child 40665 1a65f0c74827
equal deleted inserted replaced
40263:51ed7a5ad4c5 40264:b91e2e16d994
   680       THEN' (EVERY' (maps do_cluster_subst cluster_substs))
   680       THEN' (EVERY' (maps do_cluster_subst cluster_substs))
   681       THEN' rotate_tac (~ first_prem - length cluster_substs)
   681       THEN' rotate_tac (~ first_prem - length cluster_substs)
   682       THEN' release_clusters_tac thy ax_counts substs clusters
   682       THEN' release_clusters_tac thy ax_counts substs clusters
   683     end
   683     end
   684 
   684 
   685 val cluster_ord =
   685 fun cluster_key ((ax_no, (cluster_no, index_no)), skolem) =
   686   prod_ord (prod_ord int_ord (prod_ord int_ord int_ord)) bool_ord
   686   (ax_no, (cluster_no, (skolem, index_no)))
       
   687 fun cluster_ord p =
       
   688   prod_ord int_ord (prod_ord int_ord (prod_ord bool_ord int_ord))
       
   689            (pairself cluster_key p)
   687 
   690 
   688 val tysubst_ord =
   691 val tysubst_ord =
   689   list_ord (prod_ord Term_Ord.fast_indexname_ord
   692   list_ord (prod_ord Term_Ord.fast_indexname_ord
   690                      (prod_ord Term_Ord.sort_ord Term_Ord.typ_ord))
   693                      (prod_ord Term_Ord.sort_ord Term_Ord.typ_ord))
   691 
   694 
   790       fun string_for_subst_info (ax_no, (subgoal_no, (tysubst, tsubst))) =
   793       fun string_for_subst_info (ax_no, (subgoal_no, (tysubst, tsubst))) =
   791         "ax: " ^ string_of_int ax_no ^ "; asm: " ^ string_of_int subgoal_no ^
   794         "ax: " ^ string_of_int ax_no ^ "; asm: " ^ string_of_int subgoal_no ^
   792         "; tysubst: " ^ PolyML.makestring tysubst ^ "; tsubst: {" ^
   795         "; tysubst: " ^ PolyML.makestring tysubst ^ "; tsubst: {" ^
   793         commas (map ((fn (s, t) => s ^ " |-> " ^ t)
   796         commas (map ((fn (s, t) => s ^ " |-> " ^ t)
   794                      o pairself (Syntax.string_of_term ctxt)) tsubst) ^ "}"
   797                      o pairself (Syntax.string_of_term ctxt)) tsubst) ^ "}"
       
   798       val _ = tracing ("ORDERED CLUSTERS: " ^ PolyML.makestring ordered_clusters)
       
   799       val _ = tracing ("AXIOM COUNTS: " ^ PolyML.makestring ax_counts)
   795       val _ = tracing ("SUBSTS (" ^ string_of_int (length substs) ^ "):\n" ^
   800       val _ = tracing ("SUBSTS (" ^ string_of_int (length substs) ^ "):\n" ^
   796                        cat_lines (map string_for_subst_info substs))
   801                        cat_lines (map string_for_subst_info substs))
   797       val _ = tracing ("ORDERED CLUSTERS: " ^ PolyML.makestring ordered_clusters)
       
   798       val _ = tracing ("AXIOM COUNTS: " ^ PolyML.makestring ax_counts)
       
   799 *)
   802 *)
   800       fun rotation_for_subgoal i =
   803       fun rotation_for_subgoal i =
   801         find_index (fn (_, (subgoal_no, _)) => subgoal_no = i) substs
   804         find_index (fn (_, (subgoal_no, _)) => subgoal_no = i) substs
   802     in
   805     in
   803       Goal.prove ctxt [] [] @{prop False}
   806       Goal.prove ctxt [] [] @{prop False}