equal
deleted
inserted
replaced
675 [j] => |
675 [j] => |
676 if j = length hyp_ts then NONE |
676 if j = length hyp_ts then NONE |
677 else SOME (raw_label_for_name name, nth hyp_ts j) |
677 else SOME (raw_label_for_name name, nth hyp_ts j) |
678 | _ => NONE) |
678 | _ => NONE) |
679 | _ => NONE) |
679 | _ => NONE) |
680 fun dep_of_step (name, _, _, _, from) = SOME (from, name) |
680 val bot = atp_proof |> List.last |> #1 |
681 val bot = atp_proof |> List.last |> dep_of_step |> the |> snd |
|
682 val refute_graph = |
681 val refute_graph = |
683 atp_proof |> map_filter dep_of_step |> make_refute_graph bot |
682 atp_proof |
|
683 |> map (fn (name, _, _, _, from) => (from, name)) |
|
684 |> make_refute_graph bot |
|
685 |> fold (Atom_Graph.default_node o rpair ()) conjs |
684 val axioms = axioms_of_refute_graph refute_graph conjs |
686 val axioms = axioms_of_refute_graph refute_graph conjs |
685 val tainted = tainted_atoms_of_refute_graph refute_graph conjs |
687 val tainted = tainted_atoms_of_refute_graph refute_graph conjs |
686 val is_clause_tainted = exists (member (op =) tainted) |
688 val is_clause_tainted = exists (member (op =) tainted) |
687 val steps = |
689 val steps = |
688 Symtab.empty |
690 Symtab.empty |
709 let |
711 let |
710 val lits = map snd (map_filter (Symtab.lookup steps o fst) names) |
712 val lits = map snd (map_filter (Symtab.lookup steps o fst) names) |
711 in |
713 in |
712 case List.partition (can HOLogic.dest_not) lits of |
714 case List.partition (can HOLogic.dest_not) lits of |
713 (negs as _ :: _, pos as _ :: _) => |
715 (negs as _ :: _, pos as _ :: _) => |
714 HOLogic.mk_imp |
716 s_imp (Library.foldr1 s_conj (map HOLogic.dest_not negs), |
715 (Library.foldr1 s_conj (map HOLogic.dest_not negs), |
717 Library.foldr1 s_disj pos) |
716 Library.foldr1 s_disj pos) |
|
717 | _ => fold (curry s_disj) lits @{term False} |
718 | _ => fold (curry s_disj) lits @{term False} |
718 end |
719 end |
719 |> HOLogic.mk_Trueprop |> close_form |
720 |> HOLogic.mk_Trueprop |> close_form |
720 fun isar_proof_of_direct_proof infs = |
721 fun isar_proof_of_direct_proof infs = |
721 let |
722 let |