src/HOL/Tools/Metis/metis_reconstruct.ML
changeset 46708 b138dee7bed3
parent 46392 676a4b4b6e73
child 48132 9aa0fad4e864
equal deleted inserted replaced
46707:1427dcc7c9a6 46708:b138dee7bed3
   435       let
   435       let
   436         val (prems0, concl) = th |> prop_of |> Logic.strip_horn
   436         val (prems0, concl) = th |> prop_of |> Logic.strip_horn
   437         val prems = prems0 |> map normalize_literal
   437         val prems = prems0 |> map normalize_literal
   438                            |> distinct Term.aconv_untyped
   438                            |> distinct Term.aconv_untyped
   439         val goal = Logic.list_implies (prems, concl)
   439         val goal = Logic.list_implies (prems, concl)
   440         val tac = cut_rules_tac [th] 1
   440         val tac = cut_tac th 1
   441                   THEN rewrite_goals_tac @{thms not_not [THEN eq_reflection]}
   441                   THEN rewrite_goals_tac @{thms not_not [THEN eq_reflection]}
   442                   THEN ALLGOALS assume_tac
   442                   THEN ALLGOALS assume_tac
   443       in
   443       in
   444         if length prems = length prems0 then
   444         if length prems = length prems0 then
   445           raise METIS ("resynchronize", "Out of sync")
   445           raise METIS ("resynchronize", "Out of sync")
   728       val _ = tracing ("OUTER PARAMS: " ^ PolyML.makestring outer_param_names)
   728       val _ = tracing ("OUTER PARAMS: " ^ PolyML.makestring outer_param_names)
   729       val _ = tracing ("SUBSTS (" ^ string_of_int (length substs) ^ "):\n" ^
   729       val _ = tracing ("SUBSTS (" ^ string_of_int (length substs) ^ "):\n" ^
   730                        cat_lines (map string_for_subst_info substs))
   730                        cat_lines (map string_for_subst_info substs))
   731 *)
   731 *)
   732       fun cut_and_ex_tac axiom =
   732       fun cut_and_ex_tac axiom =
   733         cut_rules_tac [axiom] 1
   733         cut_tac axiom 1
   734         THEN TRY (REPEAT_ALL_NEW (etac @{thm exE}) 1)
   734         THEN TRY (REPEAT_ALL_NEW (etac @{thm exE}) 1)
   735       fun rotation_for_subgoal i =
   735       fun rotation_for_subgoal i =
   736         find_index (fn (_, (subgoal_no, _)) => subgoal_no = i) substs
   736         find_index (fn (_, (subgoal_no, _)) => subgoal_no = i) substs
   737     in
   737     in
   738       Goal.prove ctxt [] [] @{prop False}
   738       Goal.prove ctxt [] [] @{prop False}